mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Removed a redundant test in png_set_IHDR().
This commit is contained in:
5
ANNOUNCE
5
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.7.0beta14 - May 13, 2013
|
Libpng 1.7.0beta14 - June 4, 2013
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@@ -304,7 +304,8 @@ Version 1.7.0beta13 [May 12, 2013]
|
|||||||
Added information in the documentation about problems with and fixes for
|
Added information in the documentation about problems with and fixes for
|
||||||
the bad CRC and bad iTXt chunk situations.
|
the bad CRC and bad iTXt chunk situations.
|
||||||
|
|
||||||
Version 1.7.0beta14 [May 13, 2013]
|
Version 1.7.0beta14 [June 4, 2013]
|
||||||
|
Removed a redundant test in png_set_IHDR().
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
3
CHANGES
3
CHANGES
@@ -4592,7 +4592,8 @@ Version 1.7.0beta13 [May 12, 2013]
|
|||||||
Added information in the documentation about problems with and fixes for
|
Added information in the documentation about problems with and fixes for
|
||||||
the bad CRC and bad iTXt chunk situations.
|
the bad CRC and bad iTXt chunk situations.
|
||||||
|
|
||||||
Version 1.7.0beta14 [May 13, 2013]
|
Version 1.7.0beta14 [June 4, 2013]
|
||||||
|
Removed a redundant test in png_set_IHDR().
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
|||||||
11
pngset.c
11
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);
|
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
|
||||||
|
|
||||||
/* Check for potential overflow */
|
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PNG_oFFs_SUPPORTED
|
#ifdef PNG_oFFs_SUPPORTED
|
||||||
|
|||||||
Reference in New Issue
Block a user