From: Cristy Date: Tue, 27 Feb 2018 01:03:23 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6562 X-Git-Tag: 7.0.7-25~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27e2c44b892c9804ad82c825a403486711045f9d;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6562 --- diff --git a/MagickCore/property.c b/MagickCore/property.c index 2841c0622..c52f1210d 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -96,6 +96,15 @@ #include "lcms.h" #endif #endif +#if defined(MAGICKCORE_XML_DELEGATE) +# if defined(MAGICKCORE_WINDOWS_SUPPORT) +# if !defined(__MINGW32__) +# include +# endif +# endif +# include +# include +#endif /* Define declarations. @@ -1751,6 +1760,25 @@ static MagickBooleanType GetXMPProperty(const Image *image,const char *property) xmp_profile=StringInfoToString(profile); if (xmp_profile == (char *) NULL) return(MagickFalse); +#if defined(MAGICKCORE_XML_DELEGATE) + { + xmlDocPtr + xmp; + + /* + Parse XML profile. + */ + xmp=xmlReadMemory(xmp_profile,GetStringInfoLength(profile),"xmp.xml",NULL, + XML_PARSE_NOERROR | XML_PARSE_NOWARNING); + if (xmp == (xmlDocPtr) NULL) + { + xmlCleanupParser(); + xmp_profile=DestroyString(xmp_profile); + return(MagickFalse); + } + xmlFreeDoc(xmp); + } +#endif if ((strstr(xmp_profile,"