[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

@ -212,6 +212,7 @@ Version 1.6.0beta11 [February 16, 2012]
Apps are responsible for checking to see if that happened.
Version 1.6.0beta12 [February 17, 2012]
Increase num_palette to invalid_index + 1, not to invalid_index.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -3963,6 +3963,7 @@ Version 1.6.0beta11 [February 16, 2012]
Apps are responsible for checking to see if that happened.
Version 1.6.0beta12 [February 17, 2012]
Increase num_palette to invalid_index + 1, not to invalid_index.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

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++;
}