1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fixed uninitialized EX(opline) access (possible Zend/tests/gh12073.phpt crash)

This commit is contained in:
Dmitry Stogov
2023-09-05 10:11:54 +03:00
parent af2110e664
commit f1f608bf53
2 changed files with 2 additions and 0 deletions

View File

@@ -8002,6 +8002,7 @@ ZEND_VM_HANDLER(142, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, NUM)
called_scope = Z_CE(EX(This));
object = NULL;
}
SAVE_OPLINE();
zend_create_closure(EX_VAR(opline->result.var), func,
EX(func)->op_array.scope, called_scope, object);

View File

@@ -5366,6 +5366,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_C
called_scope = Z_CE(EX(This));
object = NULL;
}
SAVE_OPLINE();
zend_create_closure(EX_VAR(opline->result.var), func,
EX(func)->op_array.scope, called_scope, object);