2009/1/3  <duc.sequere.aut.de.via.dec...@imagemagick.org>:
>> Hello, this image causes the "identify" command to crash by attempting
>
> Thanks for the problem report and patch.  We updated the ImageMagick
> Subversion trunk and the fix will be available in the next point release.


Sorry, but I am no longer sure that my fix is correct. Namely, what is
the profile supposed to be set to on such invalid images? Currently,
it is set to a string that begins with "http://";. Should it be set at
all? I.e., is this more correct than my original patch?

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



-- 
Alexander E. Patrakov
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to