From: Colin King <colin.k...@canonical.com>
Date: Tue, 15 Jan 2019 18:03:38 +0000

> From: Colin Ian King <colin.k...@canonical.com>
> 
> 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.k...@canonical.com>

Applied.

Reply via email to