From: David Goulet Date: Tue, 22 Aug 2023 17:24:00 +0000 (-0400) Subject: Merge remote-tracking branch 'mbeth-private/ticket40833_mr' X-Git-Tag: tor-0.4.8.4~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c6b1da20a7e2c34435cb18fc1eb64e18277a4d98;p=thirdparty%2Ftor.git Merge remote-tracking branch 'mbeth-private/ticket40833_mr' --- c6b1da20a7e2c34435cb18fc1eb64e18277a4d98 diff --cc src/ext/equix/hashx/src/compiler_a64.c index 2e286b3099,c8a28661bb..f4efa561b9 --- a/src/ext/equix/hashx/src/compiler_a64.c +++ b/src/ext/equix/hashx/src/compiler_a64.c @@@ -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) {