diff --git a/ANNOUNCE b/ANNOUNCE index f6e6fa08b..cb553cef0 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.26beta02 - October 1, 2016 +Libpng 1.6.26beta02 - September 30, 2016 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -41,10 +41,9 @@ Version 1.6.26beta01 [September 26, 2016] Add tests/badcrc.png and tests/badadler.png to tests/pngtest. Merged pngtest.c with libpng-1.7.0beta84/pngtest.c -Version 1.6.26beta02 [October 1, 2016] +Version 1.6.26beta02 [September 30, 2016] Updated the documentation about CRC and ADLER32 handling. - Quieted about 100 warnings from clang-3.8 in pngtrans.c, pngread.c, - pngwrite.c, pngunknown.c, and pngvalid.c. + Quieted a warning from clang-3.8 in pngtrans.c. Quieted 116 (out of 288) -Wconversion compiler warnings by changing flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes in png.c, pngread.c, and pngwutil.c. diff --git a/CHANGES b/CHANGES index 47d5885b4..5fc21ef54 100644 --- a/CHANGES +++ b/CHANGES @@ -5719,10 +5719,9 @@ Version 1.6.26beta01 [September 26, 2016] Add tests/badcrc.png and tests/badadler.png to tests/pngtest. Merged pngtest.c with libpng-1.7.0beta84/pngtest.c -Version 1.6.26beta02 [October 1, 2016] +Version 1.6.26beta02 [September 30, 2016] Updated the documentation about CRC and ADLER32 handling. - Quieted about 100 warnings from clang-3.8 in pngtrans.c, pngread.c, - pngwrite.c, pngunknown.c, and pngvalid.c. + Quieted a warning from clang-3.8 in pngtrans.c. Quieted 116 (out of 288) -Wconversion compiler warnings by changing flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes in png.c, pngread.c, and pngwutil.c. diff --git a/contrib/libtests/pngunknown.c b/contrib/libtests/pngunknown.c index 8cc5213bd..8b1528296 100644 --- a/contrib/libtests/pngunknown.c +++ b/contrib/libtests/pngunknown.c @@ -476,9 +476,9 @@ get_valid(display *d, png_infop info_ptr) /* Map the text chunks back into the flags */ { png_textp text; - png_uint_32 ntext = png_get_text(d->png_ptr, info_ptr, &text, NULL) + 1; + png_uint_32 ntext = png_get_text(d->png_ptr, info_ptr, &text, NULL); - while (ntext-- > 1) switch (text[ntext - 1].compression) + while (ntext-- > 0) switch (text[ntext].compression) { case -1: flags |= PNG_INFO_tEXt; @@ -492,7 +492,7 @@ get_valid(display *d, png_infop info_ptr) break; default: fprintf(stderr, "%s(%s): unknown text compression %d\n", d->file, - d->test, text[ntext - 1].compression); + d->test, text[ntext].compression); display_exit(d); } } diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index f71b6fb29..9d3beb5fa 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -1236,13 +1236,13 @@ store_image_check(const png_store* ps, png_const_structp pp, int iImage) else { png_size_t cbRow = ps->cb_row; - png_uint_32 rows = ps->image_h + 1; + png_uint_32 rows = ps->image_h; image += iImage * (cbRow+5) * ps->image_h; image += 2; /* skip image first row markers */ - while (rows-- > 1) + while (rows-- > 0) { if (image[-2] != 190 || image[-1] != 239) png_error(pp, "row start overwritten"); @@ -11382,7 +11382,6 @@ perform_interlace_macro_validation(void) for (pass=0; pass<7; ++pass) { - /* TO DO: Check this: asan says png_uint_32 is not large enough */ png_uint_32 m, f, v; m = PNG_PASS_START_ROW(pass); diff --git a/pngread.c b/pngread.c index e30aff7c9..a5374e5b8 100644 --- a/pngread.c +++ b/pngread.c @@ -3228,10 +3228,10 @@ png_image_read_colormapped(png_voidp argument) while (--passes >= 0) { - png_uint_32 y = image->height + 1; + png_uint_32 y = image->height; png_bytep row = png_voidcast(png_bytep, display->first_row); - while (y-- > 1) + while (y-- > 0) { png_read_row(png_ptr, row, NULL); row += row_bytes; @@ -4061,10 +4061,10 @@ png_image_read_direct(png_voidp argument) while (--passes >= 0) { - png_uint_32 y = image->height + 1; + png_uint_32 y = image->height; png_bytep row = png_voidcast(png_bytep, display->first_row); - while (y-- > 1) + while (y-- > 0) { png_read_row(png_ptr, row, NULL); row += row_bytes; diff --git a/pngwrite.c b/pngwrite.c index b3ffd3093..aaa2b017d 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1527,7 +1527,7 @@ png_write_image_16bit(png_voidp argument) png_uint_16p row_end; const int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ? 3 : 1; int aindex = 0; - png_uint_32 y = image->height + 1; + png_uint_32 y = image->height; if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0) { @@ -1554,7 +1554,7 @@ png_write_image_16bit(png_voidp argument) */ row_end = output_row + image->width * (channels+1); - while (y-- > 1) + while (y-- > 0) { png_const_uint_16p in_ptr = input_row; png_uint_16p out_ptr = output_row; @@ -1682,7 +1682,7 @@ png_write_image_8bit(png_voidp argument) png_const_uint_16p input_row = png_voidcast(png_const_uint_16p, display->first_row); png_bytep output_row = png_voidcast(png_bytep, display->local_row); - png_uint_32 y = image->height + 1; + png_uint_32 y = image->height; const int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ? 3 : 1; if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0) @@ -1705,7 +1705,7 @@ png_write_image_8bit(png_voidp argument) /* Use row_end in place of a loop counter: */ row_end = output_row + image->width * (channels+1); - while (y-- > 1) + while (y-- > 0) { png_const_uint_16p in_ptr = input_row; png_bytep out_ptr = output_row; @@ -1746,7 +1746,7 @@ png_write_image_8bit(png_voidp argument) */ png_bytep row_end = output_row + image->width * channels; - while (y-- > 1) + while (y-- > 0) { png_const_uint_16p in_ptr = input_row; png_bytep out_ptr = output_row; @@ -2134,9 +2134,9 @@ png_image_write_main(png_voidp argument) { png_const_bytep row = png_voidcast(png_const_bytep, display->first_row); ptrdiff_t row_bytes = display->row_bytes; - png_uint_32 y = image->height + 1; + png_uint_32 y = image->height; - while (y-- > 1) + while (y-- > 0) { png_write_row(png_ptr, row); row += row_bytes;