zr364xx: enforce minimum size when reading header
authorAlyssa Milburn <amilburn@zall.org>
Sat, 1 Apr 2017 17:34:08 +0000 (14:34 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 12:30:14 +0000 (14:30 +0200)
commite5a9ebb4387aad53a3a81aa634734e3edcca8784
treef6d8a78c069a74bc875757692267a16a1a108ad5
parenta6e0caa3471598df6c7268c57912b24eee0e8402
zr364xx: enforce minimum size when reading header

commit ee0fe833d96793853335844b6d99fb76bd12cbeb upstream.

This code copies actual_length-128 bytes from the header, which will
underflow if the received buffer is too small.

Signed-off-by: Alyssa Milburn <amilburn@zall.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/media/usb/zr364xx/zr364xx.c