File Fix-CVE-2021-30485-bug-25.patch of Package netcdf.21641
From: Egbert Eich <eich@suse.com>
Date: Mon Oct 25 15:49:58 2021 +0200
Subject: Fix CVE-2021-30485 / bug 25
Patch-mainline: Not yet
Git-commit: a85578fba9ce221593e7e55e79ec9815aa125c98
References:
This fixes
https://sourceforge.net/p/ezxml/bugs/25/
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 f11d97e..804a833 100644
--- a/libdap4/ezxml.c
+++ b/libdap4/ezxml.c
@@ -357,7 +357,7 @@ short ezxml_internal_dtd(ezxml_root_t root, char *s, size_t len)
if (! *t) { ezxml_err(root, t, "unclosed <!ATTLIST"); break; }
if (*(s = t + strcspn(t, EZXML_WS ">")) == '>') continue;
else *s = '\0'; /* null terminate tag name*/
- for (i = 0; root->attr[i] && strcmp(n, root->attr[i][0]); i++);
+ for (i = 0; n && root->attr[i] && strcmp(n, root->attr[i][0]); i++);
for(;;) {
s++;