mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-13 20:58:16 +03:00
entities: Don't allow null name in xmlNewEntity
This commit is contained in:
parent
50816b8d1a
commit
edbf1eb63b
@ -395,6 +395,8 @@ xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type,
|
||||
if ((doc != NULL) && (doc->intSubset != NULL)) {
|
||||
return(xmlAddDocEntity(doc, name, type, ExternalID, SystemID, content));
|
||||
}
|
||||
if (name == NULL)
|
||||
return(NULL);
|
||||
return(xmlCreateEntity(doc, name, type, ExternalID, SystemID, content));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user