diff options
Diffstat (limited to 'src/sp_execute.c')
| -rw-r--r-- | src/sp_execute.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c index 1517134..bb9f64e 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -119,8 +119,24 @@ char *get_eval_filename(const char *const filename) { | |||
| 119 | static void sp_execute_ex(zend_execute_data *execute_data) { | 119 | static void sp_execute_ex(zend_execute_data *execute_data) { |
| 120 | is_in_eval_and_whitelisted(execute_data); | 120 | is_in_eval_and_whitelisted(execute_data); |
| 121 | 121 | ||
| 122 | if (UNEXPECTED(true == should_disable(execute_data, NULL, NULL, NULL))) { | 122 | if (!execute_data) { |
| 123 | sp_terminate(); | 123 | return; |
| 124 | } else if (!execute_data->prev_execute_data || | ||
| 125 | !execute_data->prev_execute_data->func || | ||
| 126 | !ZEND_USER_CODE(execute_data->prev_execute_data->func->type) || | ||
| 127 | !execute_data->prev_execute_data->opline) { | ||
| 128 | if (UNEXPECTED(true == should_disable(execute_data, NULL, NULL, NULL))) { | ||
| 129 | sp_terminate(); | ||
| 130 | } | ||
| 131 | } else if (execute_data->prev_execute_data != NULL) { | ||
| 132 | if ((execute_data->prev_execute_data->opline->opcode == ZEND_DO_FCALL || | ||
| 133 | execute_data->prev_execute_data->opline->opcode == ZEND_DO_UCALL || | ||
| 134 | execute_data->prev_execute_data->opline->opcode == | ||
| 135 | ZEND_DO_FCALL_BY_NAME)) { | ||
| 136 | if (UNEXPECTED(true == should_disable(execute_data, NULL, NULL, NULL))) { | ||
| 137 | sp_terminate(); | ||
| 138 | } | ||
| 139 | } | ||
| 124 | } | 140 | } |
| 125 | 141 | ||
| 126 | if (UNEXPECTED(EX(func)->op_array.type == ZEND_EVAL_CODE)) { | 142 | if (UNEXPECTED(EX(func)->op_array.type == ZEND_EVAL_CODE)) { |
