diff --git a/ANNOUNCE b/ANNOUNCE index 928a1e71b..70fabac86 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta77 - January 12, 2016 +Libpng 1.7.0beta77 - January 13, 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. @@ -1172,7 +1172,7 @@ Version 1.7.0beta76 [January 7, 2016] Fixed new Coverity defect, potential NULL dereference of "ps" in pngwutil.c Added temporary workaround for Coverity "Dead code" defect. -Version 1.7.0beta77 [January 12, 2016] +Version 1.7.0beta77 [January 13, 2016] Fixed new Coverity defect, another NULL dereference of "ps" in pngwutil.c Prevent the CMINFO optimization code from running twice on any PNG IDAT stream longer than 2048 bytes; the second time could overwrite bytes @@ -1212,6 +1212,7 @@ Version 1.7.0beta77 [January 12, 2016] there is an unrelated bug which means that lower zlib memLevels result in memory corruption under some circumstances, probably less often than 1:1000. + Worked around a false-positive Coverity issue in pngvalid.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index f52562a65..6550d9e42 100644 --- a/CHANGES +++ b/CHANGES @@ -5471,7 +5471,7 @@ Version 1.7.0beta76 [January 7, 2016] Fixed new Coverity defect, potential NULL dereference of "ps" in pngwutil.c Added temporary workaround for Coverity "Dead code" defect. -Version 1.7.0beta77 [January 12, 2016] +Version 1.7.0beta77 [January 13, 2016] Fixed new Coverity defect, another NULL dereference of "ps" in pngwutil.c Prevent the CMINFO optimization code from running twice on any PNG IDAT stream longer than 2048 bytes; the second time could overwrite bytes @@ -5511,6 +5511,7 @@ Version 1.7.0beta77 [January 12, 2016] there is an unrelated bug which means that lower zlib memLevels result in memory corruption under some circumstances, probably less often than 1:1000. + Worked around a false-positive Coverity issue in pngvalid.c. 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 407a0f66e..9063b69fe 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -309,8 +309,13 @@ static void r16(png_uint_16p p16, size_t count) } } -#define R16(this)\ +#ifdef __COVERITY__ +# define R16(this)\ + r16(&(this), (sizeof (this))/2U/*(sizeof (png_uint_16))*/) +#else +# define R16(this)\ r16(&(this), (sizeof (this))/(sizeof (png_uint_16))) +#endif #if defined PNG_READ_RGB_TO_GRAY_SUPPORTED ||\ defined PNG_READ_FILLER_SUPPORTED @@ -326,8 +331,14 @@ static void r32(png_uint_32p p32, size_t count) } } -#define R32(this)\ +#ifdef __COVERITY__ +# define R32(this)\ + r32(&(this), (sizeof (this))/4U/*(sizeof (png_uint_32))*/) +#else +# define R32(this)\ r32(&(this), (sizeof (this))/(sizeof (png_uint_32))) +#endif + #endif /* READ_FILLER || READ_RGB_TO_GRAY */ #endif /* READ || WRITE_tRNS || WRITE_FILTER */