mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00

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>