mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-31 06:50:06 +03:00
valid: Check for elem->name in xmlIsID
elem->name can be NULL is xmlNodeSetDoc failed.
This commit is contained in:
parent
1233805dcb
commit
af3d80b9a0
4
valid.c
4
valid.c
@ -2499,7 +2499,9 @@ xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr) {
|
||||
((doc->intSubset == NULL) && (doc->extSubset == NULL)))
|
||||
return(0);
|
||||
|
||||
if ((elem == NULL) || (elem->type != XML_ELEMENT_NODE))
|
||||
if ((elem == NULL) ||
|
||||
(elem->type != XML_ELEMENT_NODE) ||
|
||||
(elem->name == NULL))
|
||||
return(0);
|
||||
|
||||
fullelemname = (elem->ns != NULL && elem->ns->prefix != NULL) ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user