From 849e5d2498070706080049f6b6b4abec4c6109d3 Mon Sep 17 00:00:00 2001 From: glennrp Date: Sun, 25 Jul 2010 23:52:46 +0000 Subject: [PATCH] Don't "ping" a PNG datastream if it is embedded in a MNG. --- ChangeLog | 5 +++++ coders/png.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 362f111af..a7f4da309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-07-25 6.6.3-1 Glenn Randers-Pehrson + * 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 * Fix memory leak in for corrupt BMP images (reference http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=16600). diff --git a/coders/png.c b/coders/png.c index 862754d04..affd8ae95 100644 --- a/coders/png.c +++ b/coders/png.c @@ -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)))) { -- 2.40.0