[GIT-PULLS] [php-src] PR #23067: Fix segfault comparing uninitialized SimpleXMLElement instances
[email protected] (iliaal)
| Newsgroups | php.git-pulls |
|---|---|
| Message-ID | <[email protected]> |
Pull Request: https://github.com/php/php-src/pull/23067 Author: iliaal sxe_objects_compare reaches sxe1->document->ptr whenever both operands have a NULL node, without checking that document is set. A subclass whose constructor skips parent::__construct leaves both fields NULL, so `new MySXE == new MySXE` dereferences NULL and segfaults. Two unset documents now compare equal, and an unset one against a live document is uncomparable, matching the node comparison directly above.