GNOME Bugzilla – Bug 688490
Memory corruption on when moving node between documents
Last modified: 2021-07-05 13:21:54 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
Is this really a libxml++ bug? In the description you only mention libxml2 functions and the libxml2 file tree.c.
Oh, you're right. It's libxml bug, not libxml++. Sorry for wrong place.
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.