mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fixes for !READ_INTERLACE/!READ_PNG interpendencies
The reliance of png_read_png on interlace handling and some minor issues in the test programs where they failed to correctly check for interlace handling were exposed by the ability to write interlaced images even if WRITE_INTERLACING is turned off. This is fixed here. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -4362,7 +4362,11 @@ png_read_process_IDAT(png_structrp png_ptr, png_bytep transformed_row,
|
||||
# if defined(PNG_PROGRESSIVE_READ_SUPPORTED) ||\
|
||||
defined(PNG_READ_INTERLACING_SUPPORTED)
|
||||
if (png_ptr->transform_list != NULL &&
|
||||
(save_row || (png_ptr->do_interlace && pass < 6U)))
|
||||
(save_row
|
||||
# ifdef PNG_READ_INTERLACING_SUPPORTED
|
||||
|| (png_ptr->do_interlace && pass < 6U)
|
||||
# endif /* READ_INTERLACING */
|
||||
))
|
||||
{
|
||||
if (png_ptr->transformed_row == NULL)
|
||||
png_ptr->transformed_row = png_voidcast(png_bytep,
|
||||
|
||||
Reference in New Issue
Block a user