mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Improved the efficiency of the new png_check_palette_indexes()
function.
This commit is contained in:
@@ -806,7 +806,8 @@ png_write_row(png_structp png_ptr, png_const_bytep row)
|
||||
/* Added at libpng-1.5.10 */
|
||||
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||
/* Check for out-of-range palette index */
|
||||
if(row_info.color_type == PNG_COLOR_TYPE_PALETTE)
|
||||
if (row_info.color_type == PNG_COLOR_TYPE_PALETTE &&
|
||||
png_ptr->num_palette_max >= 0)
|
||||
png_do_check_palette_indexes(png_ptr, &row_info);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user