Skip to content

Commit 5959066

Browse files
committed
Fixed NULL pointer dereference
1 parent bb1d61a commit 5959066

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Zend/zend_closures.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,8 @@ static HashTable *zend_closure_get_gc(zend_object *obj, zval **table, int *n) /*
620620

621621
*table = Z_TYPE(closure->this_ptr) != IS_NULL ? &closure->this_ptr : NULL;
622622
*n = Z_TYPE(closure->this_ptr) != IS_NULL ? 1 : 0;
623-
return (closure->func.type == ZEND_USER_FUNCTION) ?
623+
return (closure->func.type == ZEND_USER_FUNCTION &&
624+
closure->func.op_array.static_variables) ?
624625
ZEND_MAP_PTR_GET(closure->func.op_array.static_variables_ptr) : NULL;
625626
}
626627
/* }}} */

0 commit comments

Comments
 (0)