[libpng16] Increase num_palette to invalid_index + 1, not to invalid_index.

This commit is contained in:
Glenn Randers-Pehrson
2012-02-16 20:48:28 -06:00
parent 566fb611b6
commit b0606ea043
3 changed files with 3 additions and 1 deletions

View File

@@ -537,7 +537,7 @@ png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row)
if (*rp >= png_ptr->num_palette)
{
png_warning(png_ptr,"Found invalid palette index");
png_ptr->num_palette=*rp;
png_ptr->num_palette=*rp + 1;
}
rp++;
}