Skip to content

ext/dom: DOMDocument::adoptNode() stale document references in the ad… - #23358

Open
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh23352
Open

ext/dom: DOMDocument::adoptNode() stale document references in the ad…#23358
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh23352

Conversation

@devnexen

Copy link
Copy Markdown
Member

…opted subtree.

Fix #23352

php_dom_transfer_document_ref() only retargeted the leftmost descendant chain, and never an attribute's value nodes, leaving retained nodes pointing at the freed source document. Replaced with an iterative walk over the whole subtree.

…opted subtree.

Fix php#23352

php_dom_transfer_document_ref() only retargeted the leftmost descendant
chain, and never an attribute's value nodes, leaving retained nodes
pointing at the freed source document. Replaced with an iterative walk
over the whole subtree.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant