Skip to content

Commit 6cada70

Browse files
committed
Fix GH-20286: use-after-destroy during userland stream_close().
1 parent 6fe40de commit 6cada70

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Zend/zend_execute_API.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,13 @@ ZEND_API zend_result zend_call_method_if_exists(
10771077
zend_object *object, zend_string *method_name, zval *retval,
10781078
uint32_t param_count, zval *params)
10791079
{
1080+
if (UNEXPECTED(!EG(active))) {
1081+
#ifdef ZEND_DEBUG
1082+
ZEND_UNREACHABLE();
1083+
#endif
1084+
return FAILURE;
1085+
}
1086+
10801087
zend_fcall_info fci;
10811088
fci.size = sizeof(zend_fcall_info);
10821089
fci.object = object;

0 commit comments

Comments
 (0)