1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

malloc-fail: Fix null deref in xmlSchemaParseUnion

Found with libFuzzer, see #344.
This commit is contained in:
Nick Wellnhofer 2023-03-05 14:10:08 +01:00
parent 9afb6c5fb8
commit 31844c74df

View File

@ -9017,6 +9017,8 @@ xmlSchemaParseUnion(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
xmlSchemaQNameRefPtr ref;
cur = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
if (cur == NULL)
return (-1);
type->base = cur;
do {
while (IS_BLANK_CH(*cur))