[devel] Fixed a long-standing bug in png_handle_sPLT() when

PNG_NO_POINTER_INDEXING is defined.
This commit is contained in:
Glenn Randers-Pehrson
2011-03-21 18:05:40 -05:00
parent 3f2339b551
commit f27592a0cd
3 changed files with 8 additions and 6 deletions

View File

@@ -1275,9 +1275,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_bytep entry_start;
png_sPLT_t new_palette;
#ifdef PNG_POINTER_INDEXING_SUPPORTED
png_sPLT_entryp pp;
#endif
png_uint_32 data_length;
int entry_size, i;
png_uint_32 skip = 0;
@@ -1442,7 +1440,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;
}
pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
pp[i].frequency = png_get_uint_16(entry_start); entry_start += 2;
}
#endif