mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Fixed incorrect warning of excess deflate data. End condition - the
warning would be produced if the end of the deflate stream wasn't read in the last row. The warning is harmless.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
7a498039c5
commit
5a1ce92c0c
7
ANNOUNCE
7
ANNOUNCE
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.7.0beta07 - April 1, 2013
|
Libpng 1.7.0beta07 - April 8, 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.
|
||||||
@@ -236,8 +236,11 @@ Version 1.7.0beta06 [March 13, 2013]
|
|||||||
technically valid, although a reasonable treatment of division would
|
technically valid, although a reasonable treatment of division would
|
||||||
show it to be incorrect.
|
show it to be incorrect.
|
||||||
|
|
||||||
Version 1.7.0beta07 [April 1, 2013]
|
Version 1.7.0beta07 [April 8, 2013]
|
||||||
Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling.
|
Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling.
|
||||||
|
Fixed incorrect warning of excess deflate data. End condition - the
|
||||||
|
warning would be produced if the end of the deflate stream wasn't read
|
||||||
|
in the last row. The warning is harmless.
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
5
CHANGES
5
CHANGES
@@ -4523,8 +4523,11 @@ Version 1.7.0beta06 [March 13, 2013]
|
|||||||
technically valid, although a reasonable treatment of division would
|
technically valid, although a reasonable treatment of division would
|
||||||
show it to be incorrect.
|
show it to be incorrect.
|
||||||
|
|
||||||
Version 1.7.0beta07 [April 1, 2013]
|
Version 1.7.0beta07 [April 8, 2013]
|
||||||
Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling.
|
Updated documentation of 1.5.x to 1.6.x changes in iCCP chunk handling.
|
||||||
|
Fixed incorrect warning of excess deflate data. End condition - the
|
||||||
|
warning would be produced if the end of the deflate stream wasn't read
|
||||||
|
in the last row. The warning is harmless.
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
15
pngrutil.c
15
pngrutil.c
@@ -3962,7 +3962,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output,
|
|||||||
png_ptr->zstream.avail_out = out;
|
png_ptr->zstream.avail_out = out;
|
||||||
}
|
}
|
||||||
|
|
||||||
else /* check for end */
|
else /* after last row, checking for end */
|
||||||
{
|
{
|
||||||
png_ptr->zstream.next_out = tmpbuf;
|
png_ptr->zstream.next_out = tmpbuf;
|
||||||
png_ptr->zstream.avail_out = (sizeof tmpbuf);
|
png_ptr->zstream.avail_out = (sizeof tmpbuf);
|
||||||
@@ -3977,10 +3977,13 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output,
|
|||||||
*/
|
*/
|
||||||
ret = inflate(&png_ptr->zstream, Z_NO_FLUSH);
|
ret = inflate(&png_ptr->zstream, Z_NO_FLUSH);
|
||||||
|
|
||||||
/* Take the unconsumed output back (so, in the 'check' case this just
|
/* Take the unconsumed output back. */
|
||||||
* counts up).
|
if (output != NULL)
|
||||||
*/
|
avail_out += png_ptr->zstream.avail_out;
|
||||||
avail_out += png_ptr->zstream.avail_out;
|
|
||||||
|
else /* avail_out counts the extra bytes */
|
||||||
|
avail_out += (sizeof tmpbuf) - png_ptr->zstream.avail_out;
|
||||||
|
|
||||||
png_ptr->zstream.avail_out = 0;
|
png_ptr->zstream.avail_out = 0;
|
||||||
|
|
||||||
if (ret == Z_STREAM_END)
|
if (ret == Z_STREAM_END)
|
||||||
@@ -4019,7 +4022,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output,
|
|||||||
if (output != NULL)
|
if (output != NULL)
|
||||||
png_error(png_ptr, "Not enough image data");
|
png_error(png_ptr, "Not enough image data");
|
||||||
|
|
||||||
else /* checking */
|
else /* the deflate stream contained extra data */
|
||||||
png_chunk_benign_error(png_ptr, "Too much image data");
|
png_chunk_benign_error(png_ptr, "Too much image data");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user