We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66d5cf8 commit 87499e4Copy full SHA for 87499e4
Zend/tests/oss_fuzz_410939023.phpt
@@ -0,0 +1,11 @@
1
+--TEST--
2
+OSS-Fuzz #410939023: Use of magic const within const expr cast
3
+--FILE--
4
+<?php
5
+
6
+const C = (string)__METHOD__;
7
+var_dump(C);
8
9
+?>
10
+--EXPECT--
11
+string(0) ""
Zend/zend_compile.c
@@ -12127,6 +12127,9 @@ static void zend_eval_const_expr(zend_ast **ast_ptr) /* {{{ */
12127
zend_eval_const_expr(&ast->child[0]);
12128
zend_eval_const_expr(&ast->child[1]);
12129
return;
12130
+ case ZEND_AST_CAST:
12131
+ zend_eval_const_expr(&ast->child[0]);
12132
+ return;
12133
default:
12134
12135
}
0 commit comments