[php-src] PR #25012: Fix GH-25007: PFA named args in constant expression write out of bounds
| From: | lazerg | Date: | Wed, 28 Oct 2026 16:47:08 +0000 |
| Subject: | [php-src] PR #25012: Fix GH-25007: PFA named args in constant expression write out of bounds | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40028@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25012
Author: lazerg
In a constant expression,
zend_ast_evaluate_arg_list() added every named argument to
named_positions, while zend_compile_args_ex() only adds named
placeholders. zp_compile() uses those positions to index the params array,
which only has room for the placeholders, so f(a: 1, b: ?) wrote past the end of it.
Now only named placeholders get a position, same as the compiled path.
Fixes #25007