usbvision: fix crash on detecting device with invalid configuration
authorVladis Dronov <vdronov@redhat.com>
Mon, 16 Nov 2015 17:55:11 +0000 (15:55 -0200)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:12:51 +0000 (13:12 +0000)
commit7deba12ad2543a299c06a81036936b3c98842419
tree4f5bf5d240bd2e957506919ce2711130d3eecb65
parentbe12cf928b5e5fe425e4796f3f40889c27b67da6
usbvision: fix crash on detecting device with invalid configuration

commit fa52bd506f274b7619955917abfde355e3d19ffe upstream.

The usbvision driver crashes when a specially crafted usb device with invalid
number of interfaces or endpoints is detected. This fix adds checks that the
device has proper configuration expected by the driver.

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/media/usb/usbvision/usbvision-video.c