mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Transformed rewrite: changed row_info, added checks. This introduces an
internal struct (png_transform_control) to replace row_info and uses
that to implement affirms correctly. The change also adds checks on
the rowbytes calculation and additional checks on most transform
implementations.
Added png_uint_16 range checking, pngvalid tRNS, fixed png_uint_16:
review of previous checks, removal of some where SAFE. pngvalid: add
testing of tRNS for better code coverage pngvalid: correct rgb-to-gray
error calculations. Code coverage is still incomplete: see /*UNTESTED*/
in pngrtran.c
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
73ea393ab2
commit
673ae608ab
@@ -2006,7 +2006,7 @@ png_write_start_row(png_structrp png_ptr)
|
||||
#endif
|
||||
|
||||
png_alloc_size_t buf_size;
|
||||
int usr_pixel_depth;
|
||||
unsigned int usr_pixel_depth;
|
||||
|
||||
png_debug(1, "in png_write_start_row");
|
||||
|
||||
@@ -2018,7 +2018,7 @@ png_write_start_row(png_structrp png_ptr)
|
||||
|
||||
/* 1.5.6: added to allow checking in the row write code. */
|
||||
png_ptr->transformed_pixel_depth = png_ptr->pixel_depth;
|
||||
png_ptr->maximum_pixel_depth = png_check_byte(png_ptr, usr_pixel_depth);
|
||||
png_ptr->maximum_pixel_depth = usr_pixel_depth;
|
||||
|
||||
/* Set up row buffer */
|
||||
png_ptr->row_buf = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size));
|
||||
|
||||
Reference in New Issue
Block a user