[libpng16] 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).
This commit is contained in:
Glenn Randers-Pehrson
2015-06-03 22:52:33 -05:00
parent a671f8baea
commit 77476d3c37
7 changed files with 28 additions and 21 deletions

View File

@@ -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) { \