Exif allocation bug
Posted: 2008-06-30T14:45:25-07:00
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
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