mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
IDAT read buffering correction
The sequential read code failed to read to the end of the IDAT stream in about 1/820 cases, resulting in a spurious warning. The png_set_compression_buffer_size API also would not work (or do bad things) if the size of a zlib uInt was less than 32 bits. This includes a quiet API change to alter png_set_compression_buffer_size to use a png_alloc_size_t, not png_size_t and implement the correct checks. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -576,7 +576,7 @@ struct png_struct_def
|
||||
#endif
|
||||
|
||||
#if defined(PNG_SEQUENTIAL_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
|
||||
uInt IDAT_size; /* limit on IDAT read and write IDAT size */
|
||||
png_uint_32 IDAT_size; /* limit on IDAT read and write IDAT size */
|
||||
#endif /* SEQUENTIAL_READ || WRITE */
|
||||
|
||||
/* ERROR HANDLING */
|
||||
|
||||
Reference in New Issue
Block a user