File Fix-CVE-2021-31347-bug-27.patch of Package netcdf.21641
From: Egbert Eich <eich@suse.com>
Date: Mon Oct 25 15:53:58 2021 +0200
Subject: Fix CVE-2021-31347 / bug 27
Patch-mainline: Not yet
Git-commit: c268bcf46d111e25691636cb3ba2256a2e9da761
References:
This fixes
https://sourceforge.net/p/ezxml/bugs/27/
Signed-off-by: Egbert Eich <eich@suse.com>
---
libdap4/ezxml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libdap4/ezxml.c b/libdap4/ezxml.c
index 68e03d5..65cdb7b 100644
--- a/libdap4/ezxml.c
+++ b/libdap4/ezxml.c
@@ -577,7 +577,7 @@ ezxml_t ezxml_parse_str(char *s, size_t len)
for (l = 0; *s && ((! l && *s != '>') || (l && (*s != ']' ||
*(s + strspn(s + 1, EZXML_WS) + 1) != '>')));
l = (*s == '[') ? 1 : l) s += strcspn(s + 1, "[]>") + 1;
- if (! *s && e != '>')
+ if (! *s)
return ezxml_err(root, d, "unclosed <!DOCTYPE");
d = (l) ? strchr(d, '[') + 1 : d;
if (l && ! ezxml_internal_dtd(root, d, s++ - d)) return &root->xml;