diff --git a/Zend/tests/oss_fuzz_410939023.phpt b/Zend/tests/oss_fuzz_410939023.phpt new file mode 100644 index 0000000000000..9c024bf5b5b06 --- /dev/null +++ b/Zend/tests/oss_fuzz_410939023.phpt @@ -0,0 +1,11 @@ +--TEST-- +OSS-Fuzz #410939023: Use of magic const within const expr cast +--FILE-- + +--EXPECT-- +string(0) "" diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 4f18999ffa785..5c15832f80a89 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -12127,6 +12127,9 @@ static void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */ zend_eval_const_expr(&ast->child[0]); zend_eval_const_expr(&ast->child[1]); return; + case ZEND_AST_CAST: + zend_eval_const_expr(&ast->child[0]); + return; default: return; }