]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11574
authorCristy <urban-warrior@imagemagick.org>
Sat, 12 Jan 2019 19:22:01 +0000 (14:22 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 12 Jan 2019 19:22:01 +0000 (14:22 -0500)
MagickCore/xml-tree.c

index 61b219f87680ab93e3fffea721e801dd639d701d..607c73620c26f2ed96035f008b75cc23e47c58f3 100644 (file)
@@ -2137,7 +2137,9 @@ MagickExport XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception)
                 utf8=DestroyString(utf8);
                 return(&root->root);
               }
-            if ((ignore_depth == 0) && (IsSkipTag(tag) == MagickFalse))
+            if ((ignore_depth != 0) || (IsSkipTag(tag) != MagickFalse))
+              (void) DestroyXMLTreeAttributes(attributes);
+            else
               {
                 ParseOpenTag(root,tag,attributes);
                 (void) ParseCloseTag(root,tag,exception);