zr364xx: enforce minimum size when reading header
authorAlyssa Milburn <amilburn@zall.org>
Sat, 1 Apr 2017 17:34:08 +0000 (14:34 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Aug 2017 01:14:00 +0000 (02:14 +0100)
commite674844ad3a2c336e23005a82354db5b9b2f4773
tree79faf25f390e0cfda3547d8136119eb10ce92f26
parent1a4b6a9aa3a892f819acf68d1a61765ec4dfc10d
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>
[bwh: Backported to 3.2: adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/media/video/zr364xx.c