diff options
| author | xXx-caillou-xXx | 2018-07-13 18:50:30 +0200 |
|---|---|---|
| committer | jvoisin | 2018-07-13 16:50:30 +0000 |
| commit | 9e26ebb1c509f44d09f60e7569f0e9e2966026c1 (patch) | |
| tree | 2a10fe34692258218d11564f2f40b1cd73cb3482 /src/sp_sloppy.c | |
| parent | 84ef3b6592bee3936ddfc271ba6e6ca1befc0eb9 (diff) | |
Fix an invalid read
Diffstat (limited to 'src/sp_sloppy.c')
| -rw-r--r-- | src/sp_sloppy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sp_sloppy.c b/src/sp_sloppy.c index 09e79d8..d5ccd6b 100644 --- a/src/sp_sloppy.c +++ b/src/sp_sloppy.c | |||
| @@ -7,8 +7,8 @@ ZEND_API zend_op_array* (*zend_compile_string_default)(zval* source_string, | |||
| 7 | 7 | ||
| 8 | static void modify_opcode(zend_op_array* opline) { | 8 | static void modify_opcode(zend_op_array* opline) { |
| 9 | if (NULL != opline) { | 9 | if (NULL != opline) { |
| 10 | zend_op* orig_opline = opline->opcodes; | 10 | for (size_t i = 0; i < opline->last; i++) { |
| 11 | for (; NULL != orig_opline->handler; orig_opline++) { | 11 | zend_op* orig_opline = &(opline->opcodes[i]); |
| 12 | if (orig_opline->opcode == ZEND_IS_EQUAL) { | 12 | if (orig_opline->opcode == ZEND_IS_EQUAL) { |
| 13 | orig_opline->opcode = ZEND_IS_IDENTICAL; | 13 | orig_opline->opcode = ZEND_IS_IDENTICAL; |
| 14 | zend_vm_set_opcode_handler(orig_opline); | 14 | zend_vm_set_opcode_handler(orig_opline); |
