mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-27 14:03:36 +03:00
Fix Null-deref-in-xmlSchemaGetComponentTargetNs
This commit is contained in:
parent
9277abe25b
commit
e4c91f7473
@ -1342,6 +1342,9 @@ xmlSchemaFormatQNameNs(xmlChar **buf, xmlNsPtr ns, const xmlChar *localName)
|
||||
static const xmlChar *
|
||||
xmlSchemaGetComponentName(xmlSchemaBasicItemPtr item)
|
||||
{
|
||||
if (item == NULL) {
|
||||
return (NULL);
|
||||
}
|
||||
switch (item->type) {
|
||||
case XML_SCHEMA_TYPE_ELEMENT:
|
||||
return (((xmlSchemaElementPtr) item)->name);
|
||||
@ -1397,6 +1400,9 @@ xmlSchemaGetQNameRefTargetNs(void *ref)
|
||||
static const xmlChar *
|
||||
xmlSchemaGetComponentTargetNs(xmlSchemaBasicItemPtr item)
|
||||
{
|
||||
if (item == NULL) {
|
||||
return (NULL);
|
||||
}
|
||||
switch (item->type) {
|
||||
case XML_SCHEMA_TYPE_ELEMENT:
|
||||
return (((xmlSchemaElementPtr) item)->targetNamespace);
|
||||
|
Loading…
x
Reference in New Issue
Block a user