]> git.baikalelectronics.ru Git - kernel.git/commit
net: can: esd_usb2: check index of array before accessing
authorMaximilian Schneider <max@schneidersoft.net>
Tue, 2 Jul 2013 23:43:29 +0000 (23:43 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 19 Jul 2013 12:55:13 +0000 (14:55 +0200)
commit7e9e4b609d5b977500bbde51dc8ff0976dfe7ae1
tree56048ef7b8a0ccac8fac41542259d107d0cc1e2e
parent3bb3374018c101d1bbbd2d2f2563e83cb8738cdd
net: can: esd_usb2: check index of array before accessing

The esd_usb2_read_bulk_callback() function is parsing the data that comes from
the USB CAN adapter. One datum is used as an index to access the dev->nets[]
array. This patch adds the missing bounds checking.

Acked-by: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Maximilian Schneider <max@schneidersoft.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/esd_usb2.c