summaryrefslogtreecommitdiff
path: root/png.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-09-30 14:45:33 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2009-09-30 14:45:33 -0500
commit837eecbc91a6a3cc77570d9f36b42500fe64c8f3 (patch)
treee49ee04015e8112dc5cceaea9ffeafdb63dc4b90 /png.c
parent26cc10a00cddb67771c9e0da1c6913ac8e22919f (diff)
downloadlibpng-837eecbc91a6a3cc77570d9f36b42500fe64c8f3.tar.gz
[master] Revised png_check_IHDR()
to avoid bogus complaints about filter method.
Diffstat (limited to 'png.c')
-rw-r--r--png.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/png.c b/png.c
index 8ee0f1a77..a356ff995 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