[php-src] PR #17205: Fix GH-17187: unreachable program point in zend_hash
| From: | nielsdos | Date: | Tue, 17 Dec 2024 20:20:34 +0000 |
| Subject: | [php-src] PR #17205: Fix GH-17187: unreachable program point in zend_hash | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-30051@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/17205
Author: nielsdos
A bunch of different issues:
1) The referenced value is copied without incrementing the refcount.
The reason the refcount isn't incremented is because otherwise
the array modifications would violate the RC1 constraints.
Solve this by copying the reference itself instead and always
read the referenced value.
2) No type checks on the array data, so malicious scripts could
cause type confusion bugs.
3) Potential overflow when the arrays resize and we access ctag.