1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/can/usb/peak_usb
Colin Ian King 8a68cc0d69 can: peak_usb: fix potential integer overflow on shift of a int
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.

Fixes: bb4785551f ("can: usb: PEAK-System Technik USB adapters driver core")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20201105112427.40688-1-colin.king@canonical.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
2020-11-15 18:24:35 +01:00
..
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
pcan_usb.c can: pcan_usb: add support of rxerr/txerr counters 2020-09-21 10:13:18 +02:00
pcan_usb_core.c can: peak_usb: fix potential integer overflow on shift of a int 2020-11-15 18:24:35 +01:00
pcan_usb_core.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
pcan_usb_fd.c can: peak_usb: add range checking in decode operations 2020-11-03 22:30:32 +01:00
pcan_usb_pro.c can: peak_usb: convert to use le32_add_cpu() 2020-09-21 10:13:18 +02:00
pcan_usb_pro.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00