usb: usbmon: Read text within supplied buffer size
authorPete Zaitcev <zaitcev@kotori.zaitcev.us>
Fri, 9 Mar 2018 06:21:14 +0000 (00:21 -0600)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 31 May 2018 23:30:21 +0000 (00:30 +0100)
commitb8021dfb921a69ec50ccb866178367f95c7b7878
tree2dbbef89839239759a8cbb6f16982e9eb497accc
parent2326c561a9a9d8a3d50a0bfe26bd54b6c26fbb9a
usb: usbmon: Read text within supplied buffer size

commit a5f596830e27e15f7a0ecd6be55e433d776986d8 upstream.

This change fixes buffer overflows and silent data corruption with the
usbmon device driver text file read operations.

Signed-off-by: Fredrik Noring <noring@nocrew.org>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/mon/mon_text.c