Re: [PATCH] fs/jfs: fix potential integer overflow on shift of a int

2021-02-09 Thread Dave Kleikamp
On 2/5/21 11:11 AM, Colin King wrote: From: Colin Ian King The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where l2nb is 32 or more this can lead to an overflow. Avoid this by shifting using the

[PATCH] fs/jfs: fix potential integer overflow on shift of a int

2021-02-05 Thread Colin King
From: Colin Ian King The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to a signed 64 bit integer. In the case where l2nb is 32 or more this can lead to an overflow. Avoid this by shifting using the BIT_ULL macro instead. Addresses-Coverity: