From 59a68c83f0ead9bac34afecba6989b71fb4902bd Mon Sep 17 00:00:00 2001 From: John Bowler Date: Tue, 30 Jan 2024 14:00:45 -0800 Subject: [PATCH] Fix contrib/conftest/pngcp.dfa This was broken by the corrections to the 'palette max' handling; if that is disabled the test of num_palette_max must be removed in pnread.c Signed-off-by: John Bowler --- pngread.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pngread.c b/pngread.c index 008a41856..07a39df6e 100644 --- a/pngread.c +++ b/pngread.c @@ -568,7 +568,11 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row) #endif #ifdef PNG_READ_TRANSFORMS_SUPPORTED - if (png_ptr->transformations || png_ptr->num_palette_max >= 0) + if (png_ptr->transformations +# ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + || png_ptr->num_palette_max >= 0 +# endif + ) png_do_read_transformations(png_ptr, &row_info); #endif