[magick-developers] Crash on invalid XML profile

Alexander E. Patrakov patrakov at gmail.com
Sat Jan 3 08:46:38 PST 2009


Hello, this image causes the "identify" command to crash by attempting
to DestroyStringInfo(NULL):
http://olympus.ourlife.ru/gallery/data/media/4/_7054831.jpg

Fix:

--- coders/jpeg.c
+++ coders/jpeg.c
@@ -574,7 +574,7 @@
               break;
             p++;
           }
-          if (*p == '\0')
+          if (i < (long) GetStringInfoLength(profile))
             DestroyStringInfo(SplitStringInfo(profile,i+1));
           (void) CopyMagickString(name,"xmp",MaxTextExtent);
         }


-- 
Alexander E. Patrakov


More information about the Magick-developers mailing list