Emilia Kasper a2fcab9978 Fix undefined behaviour in shifts.
Td4 and Te4 are arrays of u8. A u8 << int promotes the u8 to an int first then shifts.
If the mathematical result of a shift (as modelled by lhs * 2^{rhs}) is not representable
in an integer, behaviour is undefined. In other words, you can't shift into the sign bit
of a signed integer. Fix this by casting to u32 whenever we're shifting left by 24.

(For consistency, cast other shifts, too.)

Caught by -fsanitize=shift

Submitted by Nick Lewycky (Google)

Reviewed-by: Andy Polyakov <appro@openssl.org>
(cherry picked from commit 8b37e5c14f0eddb10c7f91ef91004622d90ef361)
2015-03-13 21:14:56 -07:00
..
2015-03-13 21:14:56 -07:00
2015-03-12 13:45:52 +00:00
2015-01-22 09:38:39 +00:00
2015-03-12 09:32:22 +00:00
2015-03-05 09:22:50 +00:00
2015-03-12 09:33:46 +00:00
2015-03-12 09:33:48 +00:00
2015-03-05 09:22:50 +00:00
2015-01-27 16:36:25 -05:00
2015-03-05 09:22:50 +00:00
2015-01-22 14:22:19 +00:00
2012-06-08 09:18:47 +00:00
2015-03-05 09:22:50 +00:00
2015-03-05 09:22:50 +00:00
2015-01-22 09:38:39 +00:00
2015-03-02 15:26:47 +00:00
2011-08-12 12:31:08 +00:00
2015-02-09 13:01:28 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00
2015-01-22 09:38:39 +00:00