]> git.baikalelectronics.ru Git - kernel.git/commit
media: flexcop-usb: fix endpoint type check
authorJohan Hovold <johan@kernel.org>
Mon, 22 Aug 2022 15:10:27 +0000 (17:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Sep 2022 08:40:57 +0000 (10:40 +0200)
commit4534bad1266fcae43981cef6598890f98d160a64
tree919287efd3548c9d811b3b466cf2809ebf2f57a2
parent3963032b2467c6fe59fd6595e1245899d92f7090
media: flexcop-usb: fix endpoint type check

Commit 3d83ed0d45c4 ("media: flexcop-usb: sanity checking of endpoint
type") tried to add an endpoint type sanity check for the single
isochronous endpoint but instead broke the driver by checking the wrong
descriptor or random data beyond the last endpoint descriptor.

Make sure to check the right endpoint descriptor.

Fixes: 3d83ed0d45c4 ("media: flexcop-usb: sanity checking of endpoint type")
Cc: Oliver Neukum <oneukum@suse.com>
Cc: stable@vger.kernel.org # 5.9
Reported-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20220822151027.27026-1-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/b2c2/flexcop-usb.c