diff options
Diffstat (limited to 'src/sp_disabled_functions.c')
| -rw-r--r-- | src/sp_disabled_functions.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c index 0ff859c..95e19ad 100644 --- a/src/sp_disabled_functions.c +++ b/src/sp_disabled_functions.c | |||
| @@ -210,17 +210,15 @@ static zend_execute_data* is_file_matching( | |||
| 210 | return ex; // LCOV_EXCL_LINE | 210 | return ex; // LCOV_EXCL_LINE |
| 211 | } | 211 | } |
| 212 | ITERATE(ex); | 212 | ITERATE(ex); |
| 213 | if (zend_string_equals(ex->func->op_array.filename, | 213 | if (zend_string_equals(ex->func->op_array.filename, config_node->filename)) { |
| 214 | config_node->filename)) { | ||
| 215 | return ex; // LCOV_EXCL_LINE | 214 | return ex; // LCOV_EXCL_LINE |
| 216 | } | 215 | } |
| 217 | } else if (config_node->r_filename) { | 216 | } else if (config_node->r_filename) { |
| 218 | if (sp_is_regexp_matching_zend(config_node->r_filename, current_filename)) { | 217 | if (sp_is_regexp_matching_zstr(config_node->r_filename, current_filename)) { |
| 219 | return ex; | 218 | return ex; |
| 220 | } | 219 | } |
| 221 | ITERATE(ex); | 220 | ITERATE(ex); |
| 222 | if (sp_is_regexp_matching_zend(config_node->r_filename, | 221 | if (sp_is_regexp_matching_zstr(config_node->r_filename, ex->func->op_array.filename)) { |
| 223 | ex->func->op_array.filename)) { | ||
| 224 | return ex; | 222 | return ex; |
| 225 | } | 223 | } |
| 226 | } | 224 | } |
| @@ -481,10 +479,9 @@ ZEND_FUNCTION(check_disabled_function) { | |||
| 481 | 479 | ||
| 482 | static int hook_functions_regexp(const sp_list_node* config) { | 480 | static int hook_functions_regexp(const sp_list_node* config) { |
| 483 | while (config && config->data) { | 481 | while (config && config->data) { |
| 484 | const zend_string* function_name = | 482 | const zend_string* function_name = ((sp_disabled_function*)config->data)->function; |
| 485 | ((sp_disabled_function*)config->data)->function; | 483 | sp_regexp *function_name_sp_regexp = ((sp_disabled_function*)config->data)->r_function; |
| 486 | const sp_pcre* function_name_regexp = | 484 | const sp_pcre* function_name_regexp = function_name_sp_regexp ? function_name_sp_regexp->re : NULL; |
| 487 | ((sp_disabled_function*)config->data)->r_function; | ||
| 488 | 485 | ||
| 489 | assert(function_name || function_name_regexp); | 486 | assert(function_name || function_name_regexp); |
| 490 | 487 | ||
