Page 1 of 1

Exif allocation bug

Posted: 2008-06-30T14:45:25-07:00
by mootools
Hello,

EXIF Parsers crashes when reading particular files with properties = NULL

You can download a sample of such file at:

http://www.mootools.com/tmp/crash.png

I add the following code (in bold) in GetEXIFProperty

/*
If EXIF data exists, then try to parse the request for a tag.
*/
profile=GetImageProfile(image,"exif");
if (profile == (StringInfo *) NULL)
return(MagickFalse);
if ((property == (const char *) NULL) || (*property == '\0'))
return(MagickFalse);
if (image->properties == (void *) NULL)
((Image *) image)->properties=NewSplayTree(CompareSplayTreeString,
RelinquishMagickMemory,RelinquishMagickMemory);

while (isspace((int) ((unsigned char) *property)) != 0)
property++;
all=0;
tag=(~0UL);
switch (*(property+5))
{

I hope this fix will be added to the next release,

Manuel - Mootools

Re: Exif allocation bug

Posted: 2008-06-30T16:18:02-07:00
by magick
What version of ImageMagick are you using? We're using ImageMagick 6.4.2-1 and the image converts without complaint.

Re: Exif allocation bug

Posted: 2008-07-07T06:04:42-07:00
by mootools
I am using version 6.3.8-10 and with this version image->properties is NULL when entering in GetEXIFProperty, which makes the method crashes.