diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-01-15 18:03:38 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-17 11:27:00 -0800 |
commit | cb12d72b27a6f41325ae23a11033cf5fedfa1b97 (patch) | |
tree | 766c9eab37443392f4603bc802e8fe88c960830f /net/strparser | |
parent | 0f149c9fec3cd720628ecde83bfc6f64c1e7dcb6 (diff) | |
download | linux-cb12d72b27a6f41325ae23a11033cf5fedfa1b97.tar.bz2 |
atm: he: fix sign-extension overflow on large shift
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>
Diffstat (limited to 'net/strparser')
0 files changed, 0 insertions, 0 deletions