From 9d153cc185b4e2327a4aabe645cf1fabd3b4f21b Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 5 Feb 2018 18:13:57 +0100 Subject: Massive simplification of functions hooking --- src/sp_disabled_functions.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/sp_disabled_functions.c') diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index f8c21d2..eb0ba83 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c @@ -258,8 +258,8 @@ bool should_disable(zend_execute_data* execute_data, const char* builtin_name, goto next; } } else if (config_node->r_function) { - if (false == - sp_is_regexp_matching(config_node->r_function, complete_path_function)) { + if (false == sp_is_regexp_matching(config_node->r_function, + complete_path_function)) { goto next; } } @@ -365,8 +365,8 @@ bool should_drop_on_ret(zval* return_value, goto next; } } else if (config_node->r_function) { - if (false == - sp_is_regexp_matching(config_node->r_function, complete_path_function)) { + if (false == sp_is_regexp_matching(config_node->r_function, + complete_path_function)) { goto next; } } @@ -445,10 +445,10 @@ static int hook_functions(const sp_list_node* config) { if (NULL != function_name) { // hook function by name HOOK_FUNCTION(function_name, disabled_functions_hook, - PHP_FN(check_disabled_function), false); + PHP_FN(check_disabled_function)); } else if (NULL != function_name_regexp) { // hook function by regexp HOOK_FUNCTION_BY_REGEXP(function_name_regexp, disabled_functions_hook, - PHP_FN(check_disabled_function), false); + PHP_FN(check_disabled_function)); } else { return FAILURE; } @@ -505,7 +505,7 @@ int hook_disabled_functions(void) { while (it) { hook_function((char*)it->data, SNUFFLEUPAGUS_G(sp_eval_blacklist_functions_hook), - PHP_FN(eval_blacklist_callback), false); + PHP_FN(eval_blacklist_callback)); it = it->next; } } -- cgit v1.3