From 421f95deb5835b9e0e92b5dccfa7794664235949 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Tue, 4 Jun 2013 15:05:12 -0500 Subject: [PATCH] [libpng16] Removed a redundant test in png_set_IHDR(). --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngset.c | 11 +---------- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 93832174b..c7930058c 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.6.3beta07 - May 12, 2013 +Libpng 1.6.3beta07 - June 4, 2013 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -77,7 +77,8 @@ Version 1.6.3beta06 [May 12, 2013] right zlib header files. Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile -Version 1.6.3beta07 [May 12, 2013] +Version 1.6.3beta07 [June 4, 2013] + Removed a redundant test in png_set_IHDR(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index afffcf42f..ab36db1a2 100644 --- a/CHANGES +++ b/CHANGES @@ -4561,7 +4561,8 @@ Version 1.6.3beta06 [May 12, 2013] right zlib header files. Separated CPPFLAGS and CFLAGS in contrib/pngminim/*/makefile -Version 1.6.3beta07 [May 12, 2013] +Version 1.6.3beta07 [June 4, 2013] + Removed a redundant test in png_set_IHDR(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngset.c b/pngset.c index fcb077913..aa9ac0fb5 100644 --- a/pngset.c +++ b/pngset.c @@ -238,16 +238,7 @@ png_set_IHDR(png_const_structrp png_ptr, png_inforp info_ptr, info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); - /* Check for potential overflow */ - if (width > - (PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */ - - 48 /* bigrowbuf hack */ - - 1 /* filter byte */ - - 7*8 /* rounding of width to multiple of 8 pixels */ - - 8) /* extra max_pixel_depth pad */ - info_ptr->rowbytes = 0; - else - info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); + info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); } #ifdef PNG_oFFs_SUPPORTED