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 59f8f2d commit 265f399
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ void zend_exception_restore(void) /* {{{ */

static zend_always_inline bool is_handle_exception_set(void) {
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 265f399

Please sign in to comment.