File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ PHP NEWS
22|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33?? ??? ????, PHP 8.5.2
44
5+ - Core:
6+ . Fix OSS-Fuzz #465488618 (Wrong assumptions when dumping function signature
7+ with dynamic class const lookup default argument). (ilutov)
8+
59- EXIF:
610 . Fixed bug GH-20631 (Integer underflow in exif HEIF parsing
711 when pos.size < 2). (Oblivionsage)
Original file line number Diff line number Diff line change 1+ --TEST--
2+ OSS-Fuzz #465488618: Dump function signature with dynamic class const lookup default argument
3+ --FILE--
4+ <?php
5+
6+ class A {
7+ public function test (int $ x ) {}
8+ }
9+
10+ class B extends A {
11+ public function test (string $ x = Foo::{C}) {}
12+ }
13+
14+ ?>
15+ --EXPECTF--
16+ Fatal error: Declaration of B::test(string $x = <expression>) must be compatible with A::test(int $x) in %s on line %d
Original file line number Diff line number Diff line change @@ -1011,7 +1011,9 @@ static ZEND_COLD zend_string *zend_get_function_declaration(
10111011 zend_ast * ast = Z_ASTVAL_P (zv );
10121012 if (ast -> kind == ZEND_AST_CONSTANT ) {
10131013 smart_str_append (& str , zend_ast_get_constant_name (ast ));
1014- } else if (ast -> kind == ZEND_AST_CLASS_CONST ) {
1014+ } else if (ast -> kind == ZEND_AST_CLASS_CONST
1015+ && ast -> child [1 ]-> kind == ZEND_AST_ZVAL
1016+ && Z_TYPE_P (zend_ast_get_zval (ast -> child [1 ])) == IS_STRING ) {
10151017 smart_str_append (& str , zend_ast_get_str (ast -> child [0 ]));
10161018 smart_str_appends (& str , "::" );
10171019 smart_str_append (& str , zend_ast_get_str (ast -> child [1 ]));
You can’t perform that action at this time.
0 commit comments