mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Fix png_get_current_row_number in the interlaced case.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
9c69360e97
commit
5432c01ffd
@@ -3072,7 +3072,13 @@ progressive_row(png_structp pp, png_bytep new_row, png_uint_32 y, int pass)
|
||||
* us the y in the sub-image:
|
||||
*/
|
||||
if (dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7)
|
||||
{
|
||||
if (pass != png_get_current_pass_number(pp))
|
||||
png_error(pp, "png_get_current_pass_number is broken");
|
||||
y = PNG_ROW_FROM_PASS_ROW(y, pass);
|
||||
if (y != png_get_current_row_number(pp))
|
||||
png_error(pp, "png_get_current_row_number is broken");
|
||||
}
|
||||
|
||||
/* Validate this just in case. */
|
||||
if (y >= dp->h)
|
||||
|
||||
Reference in New Issue
Block a user