Exif allocation bug

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
mootools
Posts: 19
Joined: 2005-06-30T06:08:40-07:00
Location: France

Exif allocation bug

Post 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
Manuel Jouglet
Mootools
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Exif allocation bug

Post by magick »

What version of ImageMagick are you using? We're using ImageMagick 6.4.2-1 and the image converts without complaint.
mootools
Posts: 19
Joined: 2005-06-30T06:08:40-07:00
Location: France

Re: Exif allocation bug

Post 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.
Manuel Jouglet
Mootools
Post Reply