php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #20209 appending text nodes leads to segfaults sometimes
Submitted: 2002-11-01 03:31 UTC Modified: 2002-11-01 04:06 UTC
From: chregu@php.net Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4CVS-2002-11-01 OS: linux
Private report: No CVE-ID: None
 [2002-11-01 03:31 UTC] chregu@php.net
if a text_node is appended to a node, then it can lead to segfaults if the last child of the node is also a text-node.

this is because libxml2 frees then the node. (from their docu: "Add a new node to parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case cur is freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.") and we don't...

I'll try to find a solution

chregu



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-01 04:06 UTC] chregu@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC