From 4b5afd0148cef6c845a37aff68e1fbac8f5653d7 Mon Sep 17 00:00:00 2001 From: Ben Fuhrmannek Date: Thu, 6 Jan 2022 21:22:50 +0100 Subject: prevent double checks and fixed segfault on return value access --- src/snuffleupagus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/snuffleupagus.c') diff --git a/src/snuffleupagus.c b/src/snuffleupagus.c index 1ccc412..53db721 100644 --- a/src/snuffleupagus.c +++ b/src/snuffleupagus.c @@ -334,7 +334,6 @@ static PHP_INI_MH(OnUpdateConfiguration) { } } - hook_disabled_functions(); hook_execute(); hook_cookies(); @@ -353,6 +352,8 @@ static PHP_INI_MH(OnUpdateConfiguration) { CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY; } + hook_disabled_functions(); + // If `zend_write_default` is not NULL it is already hooked. if ((zend_hash_str_find(SPCFG(disabled_functions_hooked), ZEND_STRL("echo")) || zend_hash_str_find(SPCFG(disabled_functions_ret_hooked), ZEND_STRL("echo"))) && -- cgit v1.3