summaryrefslogtreecommitdiff
path: root/src/sp_disabled_functions.c
diff options
context:
space:
mode:
authorjvoisin2020-11-29 19:37:49 +0100
committerGitHub2020-11-29 18:37:49 +0000
commit5be9082f148ab546a0317a28ef5267bb797feb53 (patch)
tree60461e4365ac69434a5529c6efa10faefc63f39f /src/sp_disabled_functions.c
parent83b631a183c1df4233438459cb3386b715e4f2b3 (diff)
Make the `>` operator skip over functions
Diffstat (limited to 'src/sp_disabled_functions.c')
-rw-r--r--src/sp_disabled_functions.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c
index 7be1c34..7e6ca6a 100644
--- a/src/sp_disabled_functions.c
+++ b/src/sp_disabled_functions.c
@@ -40,7 +40,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data,
40 sp_list_node* functions_list) { 40 sp_list_node* functions_list) {
41 zend_execute_data *orig_execute_data, *current; 41 zend_execute_data *orig_execute_data, *current;
42 orig_execute_data = current = execute_data; 42 orig_execute_data = current = execute_data;
43 sp_list_node* it = functions_list; 43 sp_list_node const * it = functions_list;
44 44
45 while (current) { 45 while (current) {
46 if (it == NULL) { // every function in the list matched, we've got a match! 46 if (it == NULL) { // every function in the list matched, we've got a match!
@@ -50,7 +50,7 @@ static bool is_functions_list_matching(zend_execute_data* execute_data,
50 50
51 EG(current_execute_data) = current; 51 EG(current_execute_data) = current;
52 52
53 char* complete_path_function = get_complete_function_path(current); 53 char* const complete_path_function = get_complete_function_path(current);
54 if (!complete_path_function) { 54 if (!complete_path_function) {
55 break; 55 break;
56 } 56 }
@@ -59,10 +59,8 @@ static bool is_functions_list_matching(zend_execute_data* execute_data,
59 59
60 if (0 == match) { 60 if (0 == match) {
61 it = it->next; 61 it = it->next;
62 current = current->prev_execute_data;
63 } else {
64 break;
65 } 62 }
63 current = current->prev_execute_data;
66 } 64 }
67 65
68 EG(current_execute_data) = orig_execute_data; 66 EG(current_execute_data) = orig_execute_data;