summaryrefslogtreecommitdiff
path: root/src/sp_disabled_functions.c
diff options
context:
space:
mode:
authorjvoisin2025-08-17 16:13:51 +0200
committerjvoisin2025-08-17 16:13:51 +0200
commitc25c8a1f25bf5ed40fbbd8642d72865dd68d054d (patch)
treeee9a75ec7515388f1f0f0f0b85e1f235f3497952 /src/sp_disabled_functions.c
parent5b89706890257dff305b6cafea7ef84a0dd173eb (diff)
Fix a NULL-ptr deref
``` Program terminated with signal SIGSEGV, Segmentation fault. 20 if (!(func->common.function_name)) { (gdb) info locals func = 0x0 function_name = 0xffb25f6d0190 "SearchByCallback" complete_path_function = 0xffb26c8a0570 "\240\005\212l\262\377" ``` It seems that in some callback shenanigans, there is currently no non-NULL `func` member in execute_data. PHP truly is marvelous. This should close #515
Diffstat (limited to '')
-rw-r--r--src/sp_disabled_functions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c
index 10a9466..050c023 100644
--- a/src/sp_disabled_functions.c
+++ b/src/sp_disabled_functions.c
@@ -17,7 +17,7 @@ char* get_complete_function_path(zend_execute_data const* const execute_data) {
17 return NULL; // LCOV_EXCL_LINE 17 return NULL; // LCOV_EXCL_LINE
18 } 18 }
19 const zend_function *const func = execute_data->func; 19 const zend_function *const func = execute_data->func;
20 if (!(func->common.function_name)) { 20 if (!func || !(func->common.function_name)) {
21 return NULL; 21 return NULL;
22 } 22 }
23 23