libpng/contrib/libtests
John Bowler 18765d0032 Fix 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.

Signed-off-by: John Bowler <jbowler@acm.org>
2015-12-17 12:53:08 -08:00
..
fakepng.c [libpng16] Fix typo (extra "*/") in contrib/libtests/fakepng.c 2015-09-15 17:07:34 -05:00
gentests.sh [libpng16] Bump version to 1.6.1beta05 2013-03-02 15:03:15 -06:00
makepng.c [libpng16] Imported from libpng-1.6.20rc01.tar 2015-11-26 07:04:24 -06:00
pngimage.c [libpng16] Bump version to 1.6.21beta01 2015-12-08 22:19:15 -06:00
pngstest-errors.h pngstest 1.6 error limit and warning revisions 2015-09-25 13:40:18 -07:00
pngstest.c [libpng16] Imported from libpng-1.6.20rc01.tar 2015-11-26 07:04:24 -06:00
pngunknown.c [libpng16] tests backported from libpng 1.7 2015-09-15 15:38:52 -07:00
pngvalid.c Fix undefined behavior in pngvalid.c 2015-12-17 12:53:08 -08:00
readpng.c [libpng16] Update CHANGES, ANNOUNCE, minor editing of contrib/*/*.c 2015-11-25 15:55:01 -06:00
tarith.c [libpng16] Change "n bit" to "n-bit" in comments. 2015-08-13 20:57:18 -05:00
timepng.c [libpng16] Reverted use png_get_libpng_ver(NULL) instead of PNG_LIBPNG_VER_STRING 2014-11-06 06:39:56 -06:00