|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-10-21 22:59 UTC] tony2001@php.net
[2005-10-21 23:20 UTC] theo at crazygreek dot co dot uk
[2005-10-21 23:30 UTC] tony2001@php.net
[2005-10-22 00:19 UTC] theo at crazygreek dot co dot uk
[2005-10-22 13:11 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 11:00:01 2025 UTC |
Description: ------------ Performing a PHP callback from within an XSLT template with a parameter of an element that is inside a external XML document causes a double free, followed by crash. Running latest stable PHP. Reproduce code: --------------- ========= crash.php ========= $xslt = new XsltProcessor(); $xslt->registerPHPFunctions(); $xslt->importStyleSheet(DOMDocument::load('test.xsl')); echo $xslt->transformToDoc(new DOMDocument())->saveXml(); function crashMe() { return null; } ========= crash.xsl ========= <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" version="1.0"> <xsl:template match="/"> <xsl:copy-of select="php:function('crashMe', document('crash.xml'))"/> </xsl:template> </xsl:stylesheet> ========= crash.xml ========= <?xml version="1.0"?> <crashed/> Expected result: ---------------- Just the following: <?xml version="1.0"?> Actual result: -------------- A crash! *** glibc detected *** double free or corruption (fasttop): 0x085d8540 *** Aborted