[libpng16] Fix an off-by-one error in the palette index checking function.

This commit is contained in:
John Bowler
2012-03-10 20:03:06 -06:00
committed by Glenn Randers-Pehrson
parent 35f2e1768b
commit 9ff37ea94f
5 changed files with 50 additions and 18 deletions

View File

@@ -635,7 +635,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
* forms produced on either GCC or MSVC.
*/
int padding = (-row_info->pixel_depth * row_info->width) & 7;
png_bytep rp = png_ptr->row_buf + 1 + row_info->rowbytes;
png_bytep rp = png_ptr->row_buf + row_info->rowbytes;
switch (row_info->bit_depth)
{