From 35908e358857942abb95af66823742e729fe82d8 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 12 Jan 2019 14:22:01 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11574 --- MagickCore/xml-tree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c index 61b219f87..607c73620 100644 --- a/MagickCore/xml-tree.c +++ b/MagickCore/xml-tree.c @@ -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); -- 2.40.0