Emilia Kasper 8b37e5c14f 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>
2015-03-13 21:10:13 -07:00
..
2015-03-13 21:10:13 -07:00
2015-03-13 16:42:44 +00:00
2015-03-12 09:18:22 +00:00
2015-02-13 13:50:36 +00:00
2015-02-24 10:11:36 +01:00
2015-03-05 09:09:57 +00:00
2015-03-12 09:22:56 +00:00
2015-03-12 09:23:42 +00:00
2015-03-05 09:09:57 +00:00
2015-02-06 16:49:17 -05:00
2015-03-05 09:09:57 +00:00
2015-03-12 14:12:17 +00:00
2015-02-06 16:49:17 -05:00
2015-02-24 10:11:36 +01:00
2015-03-12 14:12:17 +00:00
2015-03-12 14:12:17 +00:00
2015-03-05 09:09:57 +00:00
2015-03-12 09:26:14 +00:00
2015-03-12 14:12:17 +00:00
2015-03-05 09:09:57 +00:00
2015-03-12 14:12:17 +00:00
2015-03-12 14:12:17 +00:00
2015-03-12 14:12:17 +00:00
2015-01-23 15:38:41 +01:00
2015-03-05 18:20:06 +01:00
2015-01-27 17:44:12 -05:00
2015-02-09 12:53:36 +00:00
2015-01-22 09:20:09 +00:00
2015-01-23 15:38:41 +01:00
2015-01-23 19:09:01 +01:00
2015-01-22 09:20:09 +00:00
2015-01-22 09:20:09 +00:00
2015-01-22 09:20:09 +00:00
2015-01-23 11:58:26 -05:00
2015-01-22 09:20:09 +00:00
2015-03-12 14:12:17 +00:00
2014-06-04 08:34:18 +02:00
2015-02-06 14:52:40 -05:00
2015-01-22 09:20:09 +00:00