diff --git a/ANNOUNCE b/ANNOUNCE index 0dbd6ffdf..a94a81429 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta63 - June 3, 2015 +Libpng 1.7.0beta63 - June 4, 2015 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. @@ -814,10 +814,13 @@ Version 1.7.0beta62 [June 1, 2015] far as we can tell, no one uses it. The png_set_filter_heuristics() and png_set_filter_heuristics_fixed() APIs are retained but deprecated. -Version 1.7.0beta63 [June 3, 2015] +Version 1.7.0beta63 [June 4, 2015] Quieted Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c, pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt would only work with iTXt chunks with length 255 or less. + Fixed cexcept.h in which GCC 5 reported that one of the auto + variables in the Try macro needs to be volatile to prevent value + being lost over the setjmp, and fixed g++ build breaks (John Bowler). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 8cf48a8de..c89f205da 100644 --- a/CHANGES +++ b/CHANGES @@ -5109,10 +5109,13 @@ Version 1.7.0beta62 [June 1, 2015] far as we can tell, no one uses it. The png_set_filter_heuristics() and png_set_filter_heuristics_fixed() APIs are retained but deprecated. -Version 1.7.0beta63 [June 3, 2015] +Version 1.7.0beta63 [June 4, 2015] Quieted Coverity issues in pngfix.c, png-fix-itxt.c, pngvalid.c, pngstest.c, and pngimage.c. Most seem harmless, but png-fix-itxt would only work with iTXt chunks with length 255 or less. + Fixed cexcept.h in which GCC 5 reported that one of the auto + variables in the Try macro needs to be volatile to prevent value + being lost over the setjmp, and fixed g++ build breaks (John Bowler). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index 0786d8d05..35e204dfa 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -4100,7 +4100,7 @@ make_error(png_store* volatile psIn, png_byte PNG_CONST colour_type, Try { - png_structp pp; + volatile png_structp pp; png_infop pi; pp = set_store_for_write(ps, &pi, name); diff --git a/contrib/tools/png-fix-itxt.c b/contrib/tools/png-fix-itxt.c index 71d9ea5d2..b29d536d6 100644 --- a/contrib/tools/png-fix-itxt.c +++ b/contrib/tools/png-fix-itxt.c @@ -57,10 +57,10 @@ for (;;) { /* Read the length */ unsigned long length; /* must be 32 bits! */ - c=GETBREAK; buf[0] = c; length = (c % 0xff); length <<= 8; - c=GETBREAK; buf[1] = c; length += (c % 0xff); length <<= 8; - c=GETBREAK; buf[2] = c; length += (c % 0xff); length <<= 8; - c=GETBREAK; buf[3] = c; length += (c % 0xff); + c=GETBREAK; buf[0] = c; length = (c & 0xff); length <<= 8; + c=GETBREAK; buf[1] = c; length += (c & 0xff); length <<= 8; + c=GETBREAK; buf[2] = c; length += (c & 0xff); length <<= 8; + c=GETBREAK; buf[3] = c; length += (c & 0xff); /* Read the chunkname */ c=GETBREAK; buf[4] = c; diff --git a/contrib/visupng/cexcept.h b/contrib/visupng/cexcept.h index 5f45d7697..e28f3e9e4 100644 --- a/contrib/visupng/cexcept.h +++ b/contrib/visupng/cexcept.h @@ -1,11 +1,12 @@ /*=== -cexcept.h 2.0.1 (2008-Jul-19-Sat) +cexcept.h 2.0.1 (2008-Jul-19-Sat, modified 2015-Jun-03-Mon) http://www.nicemice.net/cexcept/ Adam M. Costello http://www.nicemice.net/amc/ An interface for exception-handling in ANSI C (C89 and subsequent ISO -standards), developed jointly with Cosmin Truta. +standards), developed jointly with Cosmin Truta. Revised by John Bowler, +June 2015, to declare exception_env and exception_prev "volatile". Copyright (c) 2000-2008 Adam M. Costello and Cosmin Truta. This software may be modified only if its author and version @@ -210,7 +211,7 @@ struct exception_context { \ #define Try \ { \ - jmp_buf *exception__prev, exception__env; \ + jmp_buf * volatile exception__prev, exception__env; \ exception__prev = the_exception_context->penv; \ the_exception_context->penv = &exception__env; \ if (setjmp(exception__env) == 0) { \ diff --git a/png.c b/png.c index 68f5f0fec..f1462dd1a 100644 --- a/png.c +++ b/png.c @@ -689,13 +689,13 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.7.0beta63 - June 1, 2015" PNG_STRING_NEWLINE \ + "libpng version 1.7.0beta63 - June 4, 2015" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.7.0beta63 - June 1, 2015\ + return "libpng version 1.7.0beta63 - June 4, 2015\ Copyright (c) 1998-2015 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -2747,7 +2747,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size, if (fp >= DBL_MIN && fp <= DBL_MAX) { - int exp_b10; /* A base 10 exponent */ + int exp_b10; /* A base 10 exponent */ double base; /* 10^exp_b10 */ /* First extract a base 10 exponent of the number, @@ -2795,7 +2795,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size, */ { - int czero, clead, cdigits; + unsigned int czero, clead, cdigits; char exponent[10]; /* Allow up to two leading zeros - this will not lengthen @@ -2825,7 +2825,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size, * of the loop don't break the number into parts so * that the final digit is rounded. */ - if (cdigits+czero-clead+1 < (int)precision) + if (cdigits+czero+1 < precision+clead) fp = modf(fp, &d); else @@ -2931,7 +2931,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size, *ascii++ = png_check_char(png_ptr, 48 + (int)d), ++cdigits; } } - while (cdigits+czero-clead < (int)precision && fp > DBL_MIN); + while (cdigits+czero < precision+clead && fp > DBL_MIN); /* The total output count (max) is now 4+precision */ @@ -2999,7 +2999,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size, /* Need another size check here for the exponent digits, so * this need not be considered above. */ - if ((int)size > cdigits) + if (size > cdigits) { while (cdigits > 0) *ascii++ = exponent[--cdigits]; diff --git a/pngwutil.c b/pngwutil.c index 37c2b0979..4692149bb 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -2195,7 +2195,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) { png_bytep sp; png_bytep dp; - int shift; + unsigned int shift; int d; int value; png_uint_32 i; @@ -2233,7 +2233,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) { png_bytep sp; png_bytep dp; - int shift; + unsigned int shift; int d; int value; png_uint_32 i; @@ -2270,7 +2270,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) { png_bytep sp; png_bytep dp; - int shift; + unsigned int shift; int d; int value; png_uint_32 i;