mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Merged pngvalid and pngtest from libpng-1.5; made compressed chunks
after IDAT work with the progressive read code (this is a minor and somewhat ugly fix-up; the proper fix is in 1.6).
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
c5568595ff
commit
71fcb39efc
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngpread.c - read a png file in push mode
|
||||
*
|
||||
* Last changed in libpng 1.5.11 [June 14, 2012]
|
||||
* Last changed in libpng 1.5.18 [(PENDING RELEASE)]
|
||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -897,6 +897,12 @@ png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
|
||||
*/
|
||||
ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
|
||||
|
||||
/* Hack, added in 1.5.18: the progressive reader does not reset
|
||||
* png_ptr->zstream, so any attempt to use it after the last IDAT fails
|
||||
* (silently). This allows the read code to do the reset when required.
|
||||
*/
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_PROGRESSIVE;
|
||||
|
||||
/* Check for any failure before proceeding. */
|
||||
if (ret != Z_OK && ret != Z_STREAM_END)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user