mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-25 23:21:26 +03:00
valid: Fix another use-after-free in xmlAddIDSafe
Short-lived regression.
This commit is contained in:
parent
2963a097b9
commit
2807df9a4a
10
valid.c
10
valid.c
@ -2324,12 +2324,14 @@ xmlAddIDSafe(xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr,
|
||||
/*
|
||||
* Update the attribute to make entities work.
|
||||
*/
|
||||
if (ret->attr != NULL) {
|
||||
ret->attr->id = NULL;
|
||||
ret->attr = attr;
|
||||
if (!streaming) {
|
||||
if (ret->attr != NULL) {
|
||||
ret->attr->id = NULL;
|
||||
ret->attr = attr;
|
||||
}
|
||||
attr->id = ret;
|
||||
}
|
||||
attr->atype = XML_ATTRIBUTE_ID;
|
||||
attr->id = ret;
|
||||
return(0);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user