From 837eecbc91a6a3cc77570d9f36b42500fe64c8f3 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 30 Sep 2009 14:45:33 -0500 Subject: [PATCH] [master] Revised png_check_IHDR() to avoid bogus complaints about filter method. --- png.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/png.c b/png.c index 8ee0f1a7..a356ff99 100644 --- a/png.c +++ b/png.c @@ -1051,11 +1051,16 @@ png_check_IHDR(png_structp png_ptr, ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && (color_type == PNG_COLOR_TYPE_RGB || color_type == PNG_COLOR_TYPE_RGB_ALPHA))) - png_warning(png_ptr, "Unknown filter method in IHDR"); - error = 1; + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } - if (png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) - png_warning(png_ptr, "Invalid filter method in IHDR"); + if (png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) + { + png_warning(png_ptr, "Invalid filter method in IHDR"); + error = 1; + } } #else