Commit f2cb39d99 for imagemagick.org
commit f2cb39d99b34739f4a609a8c5e604773956c10b5
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sun Nov 1 09:29:00 2026 -0500
https://github.com/ImageMagick/ImageMagick/issues/9078
diff --git a/MagickCore/xml-tree.c b/MagickCore/xml-tree.c
index 942ff21e7..28d79b19c 100644
--- a/MagickCore/xml-tree.c
+++ b/MagickCore/xml-tree.c
@@ -1803,12 +1803,17 @@ MagickExport XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception)
if (((*p != '\0') && (*p != '>')) ||
((*p == '\0') && (terminal != '>')))
{
- if (l != 0)
- (void) DestroyXMLTreeAttributes(attributes);
- (void) ThrowMagickException(exception,GetMagickModule(),
- OptionWarning,"ParseError","missing >");
- utf8=DestroyString(utf8);
- return(&root->root);
+ if ((LocaleNCompare(tag,"rdf:",4) != 0) &&
+ (LocaleNCompare(tag,"x:xmpmeta",9) != 0))
+ {
+ if (l != 0)
+ (void) DestroyXMLTreeAttributes(attributes);
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ OptionWarning,"ParseError","missing >");
+ utf8=DestroyString(utf8);
+ return(&root->root);
+ }
+ *p='>';
}
if ((ignore_depth != 0) || (IsSkipTag(tag) != MagickFalse))
(void) DestroyXMLTreeAttributes(attributes);