]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6489
authorCristy <urban-warrior@imagemagick.org>
Wed, 21 Feb 2018 17:24:23 +0000 (12:24 -0500)
committerCristy <urban-warrior@imagemagick.org>
Wed, 21 Feb 2018 17:24:23 +0000 (12:24 -0500)
MagickCore/xml-tree.c

index c19e85c6d30bc7dc937047fdb2392e46b04d0623..d9e4f11b0daa625b39b267269cde00601bb77a89 100644 (file)
@@ -2033,7 +2033,8 @@ MagickExport XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception)
         p+=strcspn(p,XMLWhitespace "/>");
         while (isspace((int) ((unsigned char) *p)) != 0)
           *p++='\0';
-        if (ignore_depth == 0)
+        if (((isalpha((int) ((unsigned char) *p)) != 0) || (*p == '_')) &&
+            (ignore_depth == 0))
           {
             if ((*p != '\0') && (*p != '/') && (*p != '>'))
               {