summaryrefslogtreecommitdiff
path: root/src/sp_disabled_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp_disabled_functions.c')
-rw-r--r--src/sp_disabled_functions.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sp_disabled_functions.c b/src/sp_disabled_functions.c
index c073b79..4ddb4af 100644
--- a/src/sp_disabled_functions.c
+++ b/src/sp_disabled_functions.c
@@ -274,6 +274,7 @@ static bool should_drop_on_ret(zval* return_value,
274 char* complete_path_function = get_complete_function_path(execute_data); 274 char* complete_path_function = get_complete_function_path(execute_data);
275 const char* current_filename = zend_get_executed_filename(TSRMLS_C); 275 const char* current_filename = zend_get_executed_filename(TSRMLS_C);
276 char current_file_hash[SHA256_SIZE * 2] = {0}; 276 char current_file_hash[SHA256_SIZE * 2] = {0};
277 bool match_type = false, match_value = false;
277 278
278 if (!complete_path_function) { 279 if (!complete_path_function) {
279 return false; 280 return false;
@@ -325,13 +326,13 @@ static bool should_drop_on_ret(zval* return_value,
325 326
326 ret_value_str = sp_convert_to_string(return_value); 327 ret_value_str = sp_convert_to_string(return_value);
327 328
328 bool match_type = (config_node->ret_type) && 329 match_type = (config_node->ret_type) &&
329 (config_node->ret_type == Z_TYPE_P(return_value)); 330 (config_node->ret_type == Z_TYPE_P(return_value));
330 bool match_value = (config_node->ret || config_node->r_ret) && 331 match_value = (config_node->ret || config_node->r_ret) &&
331 (true == sp_match_value(ret_value_str, config_node->ret, 332 (true == sp_match_value(ret_value_str, config_node->ret,
332 config_node->r_ret)); 333 config_node->r_ret));
333 334
334 if (true == match_type || match_value) { 335 if (true == match_type || true == match_value) {
335 if (true == config_node->allow) { 336 if (true == config_node->allow) {
336 efree(complete_path_function); 337 efree(complete_path_function);
337 efree(ret_value_str); 338 efree(ret_value_str);