After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 688490 - Memory corruption on when moving node between documents
Memory corruption on when moving node between documents
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
git master
Other All
: Normal critical
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-16 20:27 UTC by Ludek Vodicka
Modified: 2021-07-05 13:21 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ludek Vodicka 2012-11-16 20:27:19 UTC
xmlUnlinkNode misses to detach node strings from original documents xmlDict.

Text content of the node is valid and correct until the original document is freed. When "xmlFreeDoc" is called, all strings are freed.

This is caused here by statement "if (dict) xmlDictFree(dict);" on line 1250 file tree.c

This xmlDictFree removes all strings including strings used by detached (and already re-attached to another document) nodes.

This cause that all strings inside this/these nodes are corrupted and application crashes.

When moving nodes from one document to another, I'm using following code:

xmlUnlinkNode(pNode);
xmlAddChild(pDestinatioNode, pNode);


I hope this description helps to locate this issue. If you need more info, please let me know.

Ludek
Comment 1 Kjell Ahlstedt 2012-11-20 16:15:49 UTC
Is this really a libxml++ bug?
In the description you only mention libxml2 functions and the libxml2 file
tree.c.
Comment 2 Ludek Vodicka 2012-11-20 18:14:39 UTC
Oh, you're right. It's libxml bug, not libxml++. Sorry for wrong place.
Comment 3 GNOME Infrastructure Team 2021-07-05 13:21:54 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.