Skip to content

Fix various document ref pointer mismanagements #16345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

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