mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-25 23:21:26 +03:00
malloc-fail: Fix null deref in xmlSchemaParseWildcardNs
Found with libFuzzer, see #344.
This commit is contained in:
parent
ba290a8663
commit
e15838ab54
@ -6858,6 +6858,8 @@ xmlSchemaParseWildcardNs(xmlSchemaParserCtxtPtr ctxt,
|
||||
*/
|
||||
attr = xmlSchemaGetPropNode(node, "namespace");
|
||||
ns = xmlSchemaGetNodeContent(ctxt, (xmlNodePtr) attr);
|
||||
if (ns == NULL)
|
||||
return (-1);
|
||||
if ((attr == NULL) || (xmlStrEqual(ns, BAD_CAST "##any")))
|
||||
wildc->any = 1;
|
||||
else if (xmlStrEqual(ns, BAD_CAST "##other")) {
|
||||
|
Loading…
Reference in New Issue
Block a user