mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Fix an off-by-one error in png_do_check_palette_indexes
The last byte of each row was ignored in a function that was executed under the build flags `PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED` and `PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED`. This is a revert of a change previously applied in libpng-1.6.33beta01. See SourceForge bug #269 at https://sourceforge.net/p/libpng/bugs/269/ Reviewed-by: John Bowler <jbowler@acm.org> Signed-off-by: Cosmin Truta <ctruta@gmail.com>
This commit is contained in:
parent
6f8257e437
commit
866fdf6f8f
1
AUTHORS
1
AUTHORS
@ -4,6 +4,7 @@ PNG REFERENCE LIBRARY AUTHORS
|
||||
This is the list of PNG Reference Library ("libpng") Contributing
|
||||
Authors, for copyright and licensing purposes.
|
||||
|
||||
* Adam Richter
|
||||
* Andreas Dilger
|
||||
* Cosmin Truta
|
||||
* Dave Martindale
|
||||
|
@ -708,7 +708,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
|
||||
* forms produced on either GCC or MSVC.
|
||||
*/
|
||||
int padding = PNG_PADBITS(row_info->pixel_depth, row_info->width);
|
||||
png_bytep rp = png_ptr->row_buf + row_info->rowbytes - 1;
|
||||
png_bytep rp = png_ptr->row_buf + row_info->rowbytes;
|
||||
|
||||
switch (row_info->bit_depth)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user