Colin Ian King e5d7ffdeec atm: he: fix sign-extension overflow on large shift
[ Upstream commit cb12d72b27a6f41325ae23a11033cf5fedfa1b97 ]

Shifting the 1 by exp by an int can lead to sign-extension overlow when
exp is 31 since 1 is an signed int and sign-extending this result to an
unsigned long long will set the upper 32 bits.  Fix this by shifting an
unsigned long.

Detected by cppcheck:
(warning) Shifting signed 32-bit value by 31 bits is undefined behaviour

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-02-27 10:08:05 +01:00
..
2017-08-09 22:43:50 -07:00
2017-08-09 22:43:50 -07:00
2017-07-16 16:38:02 -07:00
2017-12-14 09:53:13 +01:00
2017-08-09 22:43:50 -07:00
2017-07-16 16:38:02 -07:00
2017-07-16 16:38:02 -07:00
2017-08-09 22:43:50 -07:00
2017-08-09 22:43:50 -07:00
2018-07-22 14:28:43 +02:00