summaryrefslogtreecommitdiff
path: root/xmlschemas.c
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2023-04-07 11:46:35 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2023-04-11 14:29:50 +0200
commite4f85f1bd2eb34d9b49da9154a4cc3a1bc284f68 (patch)
treee24fac8c8c315d76349c05feb7eb7371430938a0 /xmlschemas.c
parentcb1b8b8516ade9add9f63fa0e39eaa3bc7034828 (diff)
downloadlibxml2-e4f85f1bd2eb34d9b49da9154a4cc3a1bc284f68.tar.gz
[CVE-2023-28484] Fix null deref in xmlSchemaFixupComplexType
Fix a null pointer dereference when parsing (invalid) XML schemas. Thanks to Robby Simpson for the report! Fixes #491.
Diffstat (limited to 'xmlschemas.c')
-rw-r--r--xmlschemas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmlschemas.c b/xmlschemas.c
index 6a353858..a4eaf591 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -18632,7 +18632,7 @@ xmlSchemaFixupComplexType(xmlSchemaParserCtxtPtr pctxt,
"allowed to appear inside other model groups",
NULL, NULL);
- } else if (! dummySequence) {
+ } else if ((!dummySequence) && (baseType->subtypes != NULL)) {
xmlSchemaTreeItemPtr effectiveContent =
(xmlSchemaTreeItemPtr) type->subtypes;
/*