Input: iforce - add sanity checks
authorOliver Neukum <oneukum@suse.com>
Tue, 6 Aug 2019 16:05:55 +0000 (09:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2019 08:47:49 +0000 (10:47 +0200)
commitf13de3d677d1084485c0e4978d6e9f8b44f9972d
treec0dd6843c8569f77b92f991908b054cd3758a688
parent08b3af00a16188f3299ab6dc2c685947d61bd787
Input: iforce - add sanity checks

commit 849f5ae3a513c550cad741c68dd3d7eb2bcc2a2c upstream.

The endpoint type should also be checked before a device
is accepted.

Reported-by: syzbot+5efc10c005014d061a74@syzkaller.appspotmail.com
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/joystick/iforce/iforce-usb.c