Re: [PATCH] HID: logitech-dj: fix unintentional integer overflow on left shift

2021-02-08 Thread Colin Ian King
On 08/02/2021 15:06, Dan Carpenter wrote: > On Sun, Feb 07, 2021 at 11:21:20PM +, Colin King wrote: >> From: Colin Ian King >> >> Shifting the integer value 1 is evaluated using 32-bit rithmetic >> and then used in an expression that expects a 64-bit value, so >> there is potentially an

Re: [PATCH] HID: logitech-dj: fix unintentional integer overflow on left shift

2021-02-08 Thread Dan Carpenter
On Sun, Feb 07, 2021 at 11:21:20PM +, Colin King wrote: > From: Colin Ian King > > Shifting the integer value 1 is evaluated using 32-bit rithmetic > and then used in an expression that expects a 64-bit value, so > there is potentially an integer overflow. Fix this by using th > BIT_ULL

[PATCH] HID: logitech-dj: fix unintentional integer overflow on left shift

2021-02-07 Thread Colin King
From: Colin Ian King Shifting the integer value 1 is evaluated using 32-bit rithmetic and then used in an expression that expects a 64-bit value, so there is potentially an integer overflow. Fix this by using th BIT_ULL macro to perform the shift and avoid the overflow. Addresses-Coverity: