Skip to content

Commit f1f608b

Browse files
committed
Fixed uninitialized EX(opline) access (possible Zend/tests/gh12073.phpt crash)
1 parent af2110e commit f1f608b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8002,6 +8002,7 @@ ZEND_VM_HANDLER(142, ZEND_DECLARE_LAMBDA_FUNCTION, CONST, NUM)
80028002
called_scope = Z_CE(EX(This));
80038003
object = NULL;
80048004
}
8005+
SAVE_OPLINE();
80058006
zend_create_closure(EX_VAR(opline->result.var), func,
80068007
EX(func)->op_array.scope, called_scope, object);
80078008

Zend/zend_vm_execute.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5366,6 +5366,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_DECLARE_LAMBDA_FUNCTION_SPEC_C
53665366
called_scope = Z_CE(EX(This));
53675367
object = NULL;
53685368
}
5369+
SAVE_OPLINE();
53695370
zend_create_closure(EX_VAR(opline->result.var), func,
53705371
EX(func)->op_array.scope, called_scope, object);
53715372

0 commit comments

Comments
 (0)