mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-12 09:17:37 +03:00
malloc-fail: Fix null deref in xmlSchemaInitTypes
Found with libFuzzer, see #344.
This commit is contained in:
parent
cfbc1f48ee
commit
112340c6c0
@ -404,6 +404,10 @@ xmlSchemaInitTypes(void)
|
||||
xmlSchemaTypeAnyTypeDef = xmlSchemaInitBasicType("anyType",
|
||||
XML_SCHEMAS_ANYTYPE,
|
||||
NULL);
|
||||
if (xmlSchemaTypeAnyTypeDef == NULL) {
|
||||
xmlSchemaTypeErrMemory(NULL, NULL);
|
||||
return;
|
||||
}
|
||||
xmlSchemaTypeAnyTypeDef->baseType = xmlSchemaTypeAnyTypeDef;
|
||||
xmlSchemaTypeAnyTypeDef->contentType = XML_SCHEMA_CONTENT_MIXED;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user