php-src/ext/xsl
Niels Dossche 1925855c0f
Fix bug 69168: DomNode::getNodePath() returns invalid path
Upon freeing libxslt's context, every document which is not the *main*
document will be freed by libxslt. If a node of a document which is not
the main document gets returned to userland, we'd free the node twice:
 - first by the cleanup of the xslt context
 - and then by our own refcounting mechanism.
This was reported in bug 49634, and was fixed by always copying the
node (and later re-fixed in bug 70078).
The original fix is not entirely correct unfortunately because of the
following two main reasons:
 - modifications to the node will only modify the copy, and not the original
 - accesses to the parent, path, ... will not work

This patch fixes it properly by only copying the node if it origins from
a document other than the main document.

Co-authored-by: juha.ikavalko@agentit.fi

Closes GH-10318.
2023-01-19 14:06:41 +01:00
..
tests Fix bug 69168: DomNode::getNodePath() returns invalid path 2023-01-19 14:06:41 +01:00
config.m4 ext/xsl: Use PKG_CHECK_MODULES to detect the EXSLT library 2019-06-07 09:35:14 +02:00
config.w32 Trim trailing whitespace in source code files 2018-10-13 14:17:28 +02:00
CREDITS
php_xsl_arginfo.h Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
php_xsl.c Port all internally used classes to use default_object_handlers 2022-08-31 16:45:27 +02:00
php_xsl.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
php_xsl.stub.php Declare ext/xsl constants in stubs (#9134) 2022-07-25 21:32:07 +02:00
xsltprocessor.c Fix bug 69168: DomNode::getNodePath() returns invalid path 2023-01-19 14:06:41 +01:00