1From 73bd5d52ae314a17a6b60f7c0ab893c812e714e7 Mon Sep 17 00:00:00 2001 2From: Nick Wellnhofer <wellnhofer@aevum.de> 3Date: Sun, 5 Mar 2023 14:11:55 +0100 4Subject: [PATCH] malloc-fail: Fix type confusion after 5 xmlSchemaFixupTypeAttributeUses 6 7Found with libFuzzer, see #344. 8 9Reference:https://github.com/GNOME/libxml2/commit/73bd5d52ae314a17a6b60f7c0ab893c812e714e7 10Conflict:NA 11--- 12 xmlschemas.c | 2 ++ 13 1 file changed, 2 insertions(+) 14 15diff --git a/xmlschemas.c b/xmlschemas.c 16index dd79d2e..46cbe0f 100644 17--- a/xmlschemas.c 18+++ b/xmlschemas.c 19@@ -14572,6 +14572,7 @@ xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt, 20 { 21 PERROR_INT("xmlSchemaFixupTypeAttributeUses", 22 "failed to expand attributes"); 23+ return(-1); 24 } 25 if (pctxt->attrProhibs->nbItems != 0) 26 prohibs = pctxt->attrProhibs; 27@@ -14582,6 +14583,7 @@ xmlSchemaFixupTypeAttributeUses(xmlSchemaParserCtxtPtr pctxt, 28 { 29 PERROR_INT("xmlSchemaFixupTypeAttributeUses", 30 "failed to expand attributes"); 31+ return(-1); 32 } 33 } 34 } 35-- 362.27.0 37 38