Re: [PATCH][next] media: vivid: fix potential integer overflow on left shift

2019-06-25 Thread Hans Verkuil
On 6/25/19 9:48 AM, walter harms wrote: > > > Am 24.06.2019 23:58, schrieb Colin King: >> From: Colin Ian King >> >> There is a potential integer overflow when int 2 is left shifted >> as this is evaluated using 32 bit arithmetic but is being used in >> a context that expects an expression of

Re: [PATCH][next] media: vivid: fix potential integer overflow on left shift

2019-06-25 Thread walter harms
Am 24.06.2019 23:58, schrieb Colin King: > From: Colin Ian King > > There is a potential integer overflow when int 2 is left shifted > as this is evaluated using 32 bit arithmetic but is being used in > a context that expects an expression of type s64. Fix this by > shifting 2ULL to avoid a

[PATCH][next] media: vivid: fix potential integer overflow on left shift

2019-06-24 Thread Colin King
From: Colin Ian King There is a potential integer overflow when int 2 is left shifted as this is evaluated using 32 bit arithmetic but is being used in a context that expects an expression of type s64. Fix this by shifting 2ULL to avoid a 32 bit overflow. Addresses-Coverity: ("Unintentional