Skip to content

Commit

Permalink
Fix GH-9709: Guard against current_execute_data==NULL in is_handle_ex…
Browse files Browse the repository at this point in the history
…ception_set
  • Loading branch information
adsr authored and devnexen committed Oct 22, 2022
1 parent fa1b6ab commit 45e224c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2022, PHP 8.0.26

- CLI:
. Fixed bug GH-9709 (Null pointer dereference with -w/-s options). (Adam Saponara)

- Core:
. Fixed bug GH-9752 (Generator crashes when interrupted during argument
evaluation with extra named params). (Arnaud)
Expand Down
3 changes: 2 additions & 1 deletion Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ void zend_exception_restore(void) /* {{{ */

static zend_always_inline zend_bool is_handle_exception_set() {
zend_execute_data *execute_data = EG(current_execute_data);
return !execute_data->func
return !execute_data
|| !execute_data->func
|| !ZEND_USER_CODE(execute_data->func->common.type)
|| execute_data->opline->opcode == ZEND_HANDLE_EXCEPTION;
}
Expand Down

0 comments on commit 45e224c

Please sign in to comment.