Skip to content

Commit 45a91c4

Browse files
committed
Fix GH-16359 curl write callback crash on FCC usage w/o user function.
1 parent 25d0661 commit 45a91c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Zend/zend_API.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,9 @@ static zend_always_inline void zend_call_known_fcc(
843843
const zend_fcall_info_cache *fcc, zval *retval_ptr, uint32_t param_count, zval *params, HashTable *named_params)
844844
{
845845
zend_function *func = fcc->function_handler;
846+
if (UNEXPECTED(!func)) {
847+
return;
848+
}
846849
/* Need to copy trampolines as they get released after they are called */
847850
if (UNEXPECTED(func->common.fn_flags & ZEND_ACC_CALL_VIA_TRAMPOLINE)) {
848851
func = (zend_function*) emalloc(sizeof(zend_function));

0 commit comments

Comments
 (0)