[php-src] PR #25595: ext/dom: Fix crash in named node map iterator key() without a current item
| From: | iliaal | Date: | Thu, 19 Nov 2026 16:07:30 +0000 |
| Subject: | [php-src] PR #25595: ext/dom: Fix crash in named node map iterator key() without a current item | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40816@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25595
Author: iliaal
key() on the iterator of an attribute or DTD named node map reads the current item's object
without checking that there is one, so it segfaults on an empty map, such as the attributes of
<root/>, and reads a released wrapper once next() has moved past the last item.
Return null in that case, as valid() and current() already treat it as the end.