Skip to content

Fix various document ref pointer mismanagements - #16345

Closed
ndossche wants to merge 1 commit into
php:PHP-8.3from
ndossche:fix-more-doc-mismanagement
Closed

ndossche wants to merge 1 commit into
php:PHP-8.3from
ndossche:fix-more-doc-mismanagement

Conversation

@ndossche

Copy link
Copy Markdown
Member
  • Properly handle attributes
  • Fix potential NULL dereference if the intern document pointer is NULL

- Properly handle attributes
- Fix potential NULL dereference if the intern document pointer is NULL
@ndossche ndossche linked an issue Oct 10, 2024 that may be closed by this pull request
@ndossche ndossche linked an issue Oct 10, 2024 that may be closed by this pull request
$elem = new DOMElement("g");
$attr = new DOMAttr("iF", "j");

$elem->setAttributeNode($attr);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it took consulting an external tool (https://www.diffchecker.com/) to figure out that the difference between the _1 and _2 tests was the order of these two statements - suggest adding a comment to make it clearer to the next person that passes along

@ndossche
ndossche requested a review from Girgias October 16, 2024 17:26
@ndossche ndossche closed this in 5cb38e9 Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null-dereference in ext/dom/node.c Attribute intern document mismanagement

3 participants