From f052eab681246c721d154f4859ca420ddd8d76d4 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sat, 23 Dec 2000 12:54:42 +0000 Subject: [PATCH] Fix a possible crash bug in call_user_function_ex(), if the function is in fact not a user function --- Zend/zend_execute_API.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 8fe3ce1fb6..30159a6476 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -446,7 +446,7 @@ int call_user_function_ex(HashTable *function_table, zval **object_pp, zval *fun EG(opline_ptr) = original_opline_ptr; } else { ALLOC_INIT_ZVAL(*retval_ptr_ptr); - ((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, *object_pp, 1 ELS_CC); + ((zend_internal_function *) function_state.function)->handler(param_count, *retval_ptr_ptr, (object_pp?*object_pp:NULL), 1 ELS_CC); INIT_PZVAL(*retval_ptr_ptr); } zend_ptr_stack_clear_multiple(ELS_C); -- 2.50.1