Skip to content

Commit 0b967b7

Browse files
committed
Fix UAF when opcache is not enabled
1 parent f4323f8 commit 0b967b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,6 +2123,7 @@ zend_op_array *zend_accel_compile_pfa(zend_ast *ast,
21232123
|| declaring_op_array->refcount
21242124
|| (called_function->type == ZEND_USER_FUNCTION && called_function->op_array.refcount)) {
21252125
zend_op_array *closure = op_array->dynamic_func_defs[0];
2126+
GC_ADDREF(closure->function_name);
21262127
(*closure->refcount)++;
21272128
destroy_op_array(op_array);
21282129
efree(op_array);

0 commit comments

Comments
 (0)