From: glennrp Date: Mon, 26 Jul 2010 01:57:52 +0000 (+0000) Subject: Don't "ping" a PNG if it is embedded in a MNG. X-Git-Tag: 7.0.1-0~9110 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0ca69b143ae83fb90449a01e0b0900cb83a1cbc8;p=imagemagick Don't "ping" a PNG if it is embedded in a MNG. --- 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 8706d5688..d323c6ef0 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 ((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)))) {