From c102fd3535cbed3d8a22d77306dedf2caf7c8674 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Fri, 7 Jan 2022 18:01:50 +0100 Subject: fixed invalid return value --- src/sp_disabled_functions.c | 2 +- src/sp_execute.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index c0c642b..0ff859c 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -469,7 +469,7 @@ static void should_drop_on_ret(const zval* return_value, ZEND_FUNCTION(check_disabled_function) { zif_handler orig_handler; - const char* current_function_name = get_active_function_name(TSRMLS_C); + const char* current_function_name = get_active_function_name(); should_disable_ht(execute_data, current_function_name, NULL, NULL, SPCFG(disabled_functions_reg).disabled_functions, SPCFG(disabled_functions_hooked)); diff --git a/src/sp_execute.c b/src/sp_execute.c index aadd145..f1ed8d0 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c @@ -190,7 +190,7 @@ static inline void sp_execute_handler(INTERNAL_FUNCTION_PARAMETERS, bool interna // execute_data, so we need to use a local variable to be able to match on // it later. zval ret_val; - if (EX(return_value) == NULL) { + if (EX(return_value) == NULL && return_value == NULL) { memset(&ret_val, 0, sizeof(ret_val)); return_value = EX(return_value) = &ret_val; } -- cgit v1.3