]> granicus.if.org Git - imagemagick/commitdiff
Don't "ping" a PNG if it is embedded in a MNG.
authorglennrp <glennrp@git.imagemagick.org>
Mon, 26 Jul 2010 01:57:52 +0000 (01:57 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Mon, 26 Jul 2010 01:57:52 +0000 (01:57 +0000)
ChangeLog
coders/png.c

index 362f111af5b7c94141c71089d47fae9110f1f704..a7f4da309b144ca24ba1c744c4ef9e2986edac51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-25  6.6.3-1 Glenn Randers-Pehrson <glennrp@image...>
+  * Don't "ping" a PNG image if it is embedded in a MNG.  Otherwise the
+    reader tries to read MNG chunks from the interior of the embedded PNG,
+    resulting in an erroneous "corrupted image" message.
+
 2010-07-09  6.6.3-1 Cristy  <quetzlzacatenango@image...>
   * Fix memory leak in for corrupt BMP images (reference
     http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16600).
index 8706d5688cc83001ca2b66a48166e1c1660ca58d..d323c6ef04317e9c81f837c79342f827ed7e985c 100644 (file)
@@ -2378,7 +2378,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
   */
   if (image->delay != 0)
     mng_info->scenes_found++;
-  if ((mng_info->mng_type != 0) || (
+  if ((mng_info->mng_type == 0 && (image->ping != MagickFalse)) || (
       (image_info->number_scenes != 0) && (mng_info->scenes_found > (ssize_t)
       (image_info->first_scene+image_info->number_scenes))))
     {