mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Changed png_inflate() and calling routines to avoid overflow
problems. This is an intermediate check-in that solves the immediate problems and introduces one performance improvement (avoiding a copy via png_ptr->zbuf.) Further changes will be made to make ICC profile handling more secure.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
29a6ba01a7
commit
0ae4f7b705
@@ -491,8 +491,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
|
||||
png_ptr->zstream.next_in = png_ptr->zbuf;
|
||||
if (png_ptr->zbuf_size > png_ptr->idat_size)
|
||||
png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;
|
||||
png_crc_read(png_ptr, png_ptr->zbuf,
|
||||
(png_size_t)png_ptr->zstream.avail_in);
|
||||
png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in);
|
||||
png_ptr->idat_size -= png_ptr->zstream.avail_in;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user