Fix buffer overwrite in png_build_index
Fixes buffer size calculations to take possible transformations
into account. Images with less than 256 colors in the palette,
that are transformed up to 8-bit, will not overwrite memory at
the end of the buffer. Verified with a 16 color image.
Also fixes some build warnings.
Signed-off-by: Henrik Smiding <email@example.com>
(cherry picked from commit d3ff9df7a1191da1c47710ea8bd568204e74a976)
1 file changed