1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 03:03:26 +02:00

Tracing JIT: Fixed possible stack-buffer-overflow.

This commit is contained in:
Dmitry Stogov
2021-09-23 10:51:20 +03:00
parent 17a99f2b11
commit 08100e81e5
+2 -2
View File
@@ -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; \
}
@@ -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; \
}