Skip to content

Conversation

nielsdos
Copy link
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
@nielsdos nielsdos linked an issue Oct 10, 2024 that may be closed by this pull request
@nielsdos nielsdos 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
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

@nielsdos nielsdos requested a review from Girgias October 16, 2024 17:26
@nielsdos nielsdos 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