]> granicus.if.org Git - imagemagick/commitdiff
Don't "ping" a PNG datastream if it is embedded in a MNG.
authorglennrp <glennrp@git.imagemagick.org>
Sun, 25 Jul 2010 23:52:46 +0000 (23:52 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Sun, 25 Jul 2010 23:52:46 +0000 (23:52 +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 862754d043769c57186cb058ea515cb931f86186..affd8ae95d6b5407b45dceed9e0f3c909195c498 100644 (file)
@@ -2378,7 +2378,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
   */
   if (image->delay != 0)
     mng_info->scenes_found++;
-  if ((image->ping != MagickFalse) || (
+  if ((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))))
     {