ttusb2: limit messages to buffer size

commit a12b8ab8c5 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alyssa Milburn 2017-04-01 14:34:32 -03:00 • committed by Greg Kroah-Hartman
commit 4f93054d9b