Skip to content

Commit

Permalink
Tracing JIT: Fixed possible stack-buffer-overflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Sep 23, 2021
1 parent 17a99f2 commit 08100e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/opcache/jit/zend_jit_vm_helpers.c
Expand Up @@ -350,7 +350,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_trace_helper(ZEND_OPCODE_HAN
trace_buffer[idx].info = _op | (_info); \
trace_buffer[idx].ptr = _ptr; \
idx++; \
if (idx >= ZEND_JIT_TRACE_MAX_LENGTH - 1) { \
if (idx >= ZEND_JIT_TRACE_MAX_LENGTH - 2) { \
stop = ZEND_JIT_TRACE_STOP_TOO_LONG; \
break; \
}
Expand All @@ -362,7 +362,7 @@ ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL zend_jit_loop_trace_helper(ZEND_OPCODE_HAN
trace_buffer[idx].op3_type = _op3_type; \
trace_buffer[idx].ptr = _ptr; \
idx++; \
if (idx >= ZEND_JIT_TRACE_MAX_LENGTH - 1) { \
if (idx >= ZEND_JIT_TRACE_MAX_LENGTH - 2) { \
stop = ZEND_JIT_TRACE_STOP_TOO_LONG; \
break; \
}
Expand Down

0 comments on commit 08100e8

Please sign in to comment.