diff --git a/ANNOUNCE b/ANNOUNCE index e9e5b187d..cdce864aa 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.7.0beta74 - December 15, 2015 +Libpng 1.7.0beta74 - December 18, 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. @@ -1092,7 +1092,7 @@ Version 1.7.0beta73 [December 11, 2015] Changed png_struct->options from png_byte to png_uint_32, to hold up to 16 2-bit options. -Version 1.7.0beta74 [December 15, 2015] +Version 1.7.0beta74 [December 18, 2015] Fixed copyright years in source files. Removed LE/BE dependencies in pngvalid, to 'fix' the current problem in the BigEndian tests by not testing it, making the BE code the same @@ -1104,6 +1104,13 @@ Version 1.7.0beta74 [December 15, 2015] the 'DIGITIZE' case (the code used prior to 1.7 for rgb_to_gray error checks) and changed the check to only operate in non-release builds (base build type not RC or RELEASE.) + Fixed undefined behavior in pngvalid.c, undefined because + (png_byte) << shift is undefined if it changes the signed bit + (because png_byte is promoted to int). The libpng exported functions + png_get_uint_32 and png_get_uint_16 handle this. (Bug reported by + David Drysdale as a result of reports from UBSAN in clang 3.8). + This changes pngvalid to use BE random numbers; this used to produce + errors but these should not be fixed as a result of the previous changes. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index d1a4fc441..52d8f87d6 100644 --- a/CHANGES +++ b/CHANGES @@ -5391,7 +5391,7 @@ Version 1.7.0beta73 [December 11, 2015] Changed png_struct->options from png_byte to png_uint_32, to hold up to 16 2-bit options. -Version 1.7.0beta74 [December 15, 2015] +Version 1.7.0beta74 [December 18, 2015] Fixed copyright years in source files. Removed LE/BE dependencies in pngvalid, to 'fix' the current problem in the BigEndian tests by not testing it, making the BE code the same @@ -5403,6 +5403,13 @@ Version 1.7.0beta74 [December 15, 2015] the 'DIGITIZE' case (the code used prior to 1.7 for rgb_to_gray error checks) and changed the check to only operate in non-release builds (base build type not RC or RELEASE.) + Fixed undefined behavior in pngvalid.c, undefined because + (png_byte) << shift is undefined if it changes the signed bit + (because png_byte is promoted to int). The libpng exported functions + png_get_uint_32 and png_get_uint_16 handle this. (Bug reported by + David Drysdale as a result of reports from UBSAN in clang 3.8). + This changes pngvalid to use BE random numbers; this used to produce + errors but these should not be fixed as a result of the previous changes. 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 358908f69..f5b11de6c 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -1,7 +1,7 @@ /* pngvalid.c - validate libpng by constructing then reading png files. * - * Last changed in libpng 1.6.21 [(PENDING RELEASE)] + * Last changed in libpng 1.5.27 [(PENDING RELEASE)] * Copyright (c) 2014-2015 Glenn Randers-Pehrson * Written by John Cunningham Bowler *