1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-12-25 23:21:26 +03:00

valid: Fix use-after-free in xmlAddIDSafe

Short-lived regression.
This commit is contained in:
Nick Wellnhofer 2024-02-04 13:30:32 +01:00
parent d463733fce
commit 70da4c089c

View File

@ -2373,7 +2373,8 @@ xmlAddIDSafe(xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr,
}
attr->atype = XML_ATTRIBUTE_ID;
attr->id = ret;
if (!streaming)
attr->id = ret;
if (id != NULL)
*id = ret;