ttusb2: limit messages to buffer size
authorAlyssa Milburn <amilburn@zall.org>
Sat, 1 Apr 2017 17:34:32 +0000 (14:34 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 26 Aug 2017 01:14:01 +0000 (02:14 +0100)
commita09cc2a3ed2e817924c6d138b6ac23e991878139
treedad66daa6cf6001044894d4d034b6ba7aa321810
parent489c80155c8691d282ce18f62a3a83b0adf9ee0e
ttusb2: limit messages to buffer size

commit a12b8ab8c5ff7ccd7b107a564743507c850a441d upstream.

Otherwise ttusb2_i2c_xfer can read or write beyond the end of static and
heap buffers.

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/dvb/dvb-usb/ttusb2.c