diff options
| author | Ben Fuhrmannek | 2022-01-06 21:22:50 +0100 |
|---|---|---|
| committer | Ben Fuhrmannek | 2022-01-06 21:22:50 +0100 |
| commit | 4b5afd0148cef6c845a37aff68e1fbac8f5653d7 (patch) | |
| tree | ad4a4832d3ddaa33e336216a3363107acf02c2ed /src/snuffleupagus.c | |
| parent | 94d3124c3972ee950a40dad72fe1b4bcf16db2c4 (diff) | |
prevent double checks and fixed segfault on return value access
Diffstat (limited to 'src/snuffleupagus.c')
| -rw-r--r-- | src/snuffleupagus.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) { | |||
| 334 | } | 334 | } |
| 335 | } | 335 | } |
| 336 | 336 | ||
| 337 | hook_disabled_functions(); | ||
| 338 | hook_execute(); | 337 | hook_execute(); |
| 339 | hook_cookies(); | 338 | hook_cookies(); |
| 340 | 339 | ||
| @@ -353,6 +352,8 @@ static PHP_INI_MH(OnUpdateConfiguration) { | |||
| 353 | CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY; | 352 | CG(compiler_options) |= ZEND_COMPILE_HANDLE_OP_ARRAY; |
| 354 | } | 353 | } |
| 355 | 354 | ||
| 355 | hook_disabled_functions(); | ||
| 356 | |||
| 356 | // If `zend_write_default` is not NULL it is already hooked. | 357 | // If `zend_write_default` is not NULL it is already hooked. |
| 357 | if ((zend_hash_str_find(SPCFG(disabled_functions_hooked), ZEND_STRL("echo")) || | 358 | if ((zend_hash_str_find(SPCFG(disabled_functions_hooked), ZEND_STRL("echo")) || |
| 358 | zend_hash_str_find(SPCFG(disabled_functions_ret_hooked), ZEND_STRL("echo"))) && | 359 | zend_hash_str_find(SPCFG(disabled_functions_ret_hooked), ZEND_STRL("echo"))) && |
