Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2019-10-01 15:19:49 +0200
committerOliver Neukum <oneukum@suse.com>2019-10-01 15:19:49 +0200
commitbe2b13f0e36d5d865cf9d07f395b072e600b0f74 (patch)
treec2d3d572effa6b7c9782c8ba9f05b61c91a397e3
parentb35f6ddd2bbfad133c1d22c7756a2576110a4f51 (diff)
b2c2-flexcop-usb: add sanity checking (bsc#1146540
CVE-2019-15291). suse-commit: 300993f4da8bd3956718cb44247a05f818ceea26
-rw-r--r--drivers/media/usb/b2c2/flexcop-usb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/usb/b2c2/flexcop-usb.c b/drivers/media/usb/b2c2/flexcop-usb.c
index 1826ff825c2e..1a801dc286f8 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -538,6 +538,9 @@ static int flexcop_usb_probe(struct usb_interface *intf,
struct flexcop_device *fc = NULL;
int ret;
+ if (intf->cur_altsetting->desc.bNumEndpoints < 1)
+ return -ENODEV;
+
if ((fc = flexcop_device_kmalloc(sizeof(struct flexcop_usb))) == NULL) {
err("out of memory\n");
return -ENOMEM;