1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-01-28 17:47:00 +03:00

Don't try to copy children of entity references

This would result in an error, aborting the whole copy operation.
Regressed in commit 7618a3b1.

Fixes #371.
This commit is contained in:
Nick Wellnhofer 2022-04-23 17:41:44 +02:00
parent 0c0f2a57c7
commit d314046f89

3
tree.c
View File

@ -4372,7 +4372,8 @@ xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
insert->last = copy;
}
if (cur->children != NULL) {
if ((cur->type != XML_ENTITY_REF_NODE) &&
(cur->children != NULL)) {
cur = cur->children;
insert = copy;
continue;