[magick-developers] Invalid memory access with XML profiles
duc.sequere.aut.de.via.decede at imagemagick.org
duc.sequere.aut.de.via.decede at imagemagick.org
Sat Jan 3 11:10:40 PST 2009
> i.e., here p may be not 0-terminated. However, NewXmlTree() calls
> strlen() on its argument. This is a bug.
Which version of ImageMagick are you using? The latest release accounts for
the problem you reported by using StringInfoToString():
profile=GetImageProfile(image,"xmp");
if (profile == (StringInfo *) NULL)
return(MagickFalse);
if ((property == (const char *) NULL) || (*property == '\0'))
return(MagickFalse);
xmp_profile=StringInfoToString(profile);
if (xmp_profile == (char *) NULL)
return(MagickFalse);
for (p=xmp_profile; *p != '\0'; p++)
if ((*p == '<') && (*(p+1) == 'x'))
break;
exception=AcquireExceptionInfo();
xmp=NewXMLTree((char *) p,exception);
More information about the Magick-developers
mailing list