lkml.org 
[lkml]   [2020]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH][next] can: usb: fix potential integer overflow on shift of a int
From
Date
On 11/5/20 12:24 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The left shift of int 32 bit integer constant 1 is evaluated using
> 32 bit arithmetic and then assigned to a signed 64 bit variable. In
> the case where time_ref->adapter->ts_used_bits is 32 or more this
> can lead to an oveflow. Avoid this by shifting using the BIT_ULL macro
> instead.
>
> Addresses-Coverity: ("Unintentional integer overflow")
> Fixes: bb4785551f64 ("can: usb: PEAK-System Technik USB adapters driver core")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied to linux-can/testing (not to next).

Thanks,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-11-05 14:08    [W:0.130 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site