diff options
| author | xXx-caillou-xXx | 2018-08-28 18:13:29 +0200 |
|---|---|---|
| committer | jvoisin | 2018-08-28 16:13:29 +0000 |
| commit | 888242c30d822392953e1b5f4fc289a96e9da5e0 (patch) | |
| tree | b687185d02018594f5c28743a503816cdf291876 /src/sp_execute.c | |
| parent | 2950b59dad013a0c47e4d38d43db3de759c07cad (diff) | |
Fix a SIGSEGV on user-created function's return value
Diffstat (limited to 'src/sp_execute.c')
| -rw-r--r-- | src/sp_execute.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/sp_execute.c b/src/sp_execute.c index 4b7d6d0..844647e 100644 --- a/src/sp_execute.c +++ b/src/sp_execute.c | |||
| @@ -187,14 +187,16 @@ static void sp_execute_ex(zend_execute_data *execute_data) { | |||
| 187 | 187 | ||
| 188 | orig_execute_ex(execute_data); | 188 | orig_execute_ex(execute_data); |
| 189 | 189 | ||
| 190 | if (UNEXPECTED( | 190 | if (EX(return_value) != NULL) { |
| 191 | if (UNEXPECTED( | ||
| 191 | true == | 192 | true == |
| 192 | should_drop_on_ret_ht( | 193 | should_drop_on_ret_ht( |
| 193 | EX(return_value), function_name, | 194 | EX(return_value), function_name, |
| 194 | SNUFFLEUPAGUS_G(config) | 195 | SNUFFLEUPAGUS_G(config) |
| 195 | .config_disabled_functions_reg_ret->disabled_functions, | 196 | .config_disabled_functions_reg_ret->disabled_functions, |
| 196 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret))) { | 197 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret))) { |
| 197 | sp_terminate(); | 198 | sp_terminate(); |
| 199 | } | ||
| 198 | } | 200 | } |
| 199 | efree(function_name); | 201 | efree(function_name); |
| 200 | } else { | 202 | } else { |
