media: dvb-usb-v2: lmedm04: Improve logic checking of warm start
authorMalcolm Priestley <tvboxspy@gmail.com>
Tue, 26 Sep 2017 21:10:20 +0000 (17:10 -0400)
committerPeter Michael Green <plugwash@raspbian.org>
Wed, 7 Feb 2018 23:32:32 +0000 (23:32 +0000)
commit38ba881f098daaf4775d48300c9adb94e8a03f20
tree315cecfb39f9dc21d15d5c32e13fd9650834e53d
parente67ee7457bf80de7f749b883a6743d838fb8eae4
media: dvb-usb-v2: lmedm04: Improve logic checking of warm start

Warm start has no check as whether a genuine device has
connected and proceeds to next execution path.

Check device should read 0x47 at offset of 2 on USB descriptor read
and it is the amount requested of 6 bytes.

Fix for
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access as

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name media-dvb-usb-v2-lmedm04-Improve-logic-checking-of-w.patch
drivers/media/usb/dvb-usb-v2/lmedm04.c