]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Merge remote-tracking branch 'mbeth-private/ticket40833_mr'
authorDavid Goulet <dgoulet@torproject.org>
Tue, 22 Aug 2023 17:24:00 +0000 (13:24 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Tue, 22 Aug 2023 17:24:00 +0000 (13:24 -0400)
1  2 
src/ext/equix/hashx/src/compiler_a64.c
src/ext/equix/src/lib.rs

index 2e286b3099c188b12edeae2293ac664883066ef2,c8a28661bba4a47afd118259b5182e861870d532..f4efa561b96e65fa5ba6e7bbb1f635f0927caa62
@@@ -55,7 -58,9 +58,9 @@@ bool hashx_compile_a64(const hashx_prog
        uint8_t* target = NULL;
        int creg = -1;
        EMIT(pos, a64_prologue);
 -      for (int i = 0; i < program->code_size; ++i) {
 +      for (size_t i = 0; i < program->code_size; ++i) {
+               if (pos + COMP_MAX_INSTR_SIZE > code + COMP_CODE_SIZE)
+                       return false;
                const instruction* instr = &program->code[i];
                switch (instr->opcode)
                {
Simple merge