USB: cdc-wdm: fix buffer overflow
authorOliver Neukum <oneukum@suse.de>
Tue, 12 Mar 2013 13:52:42 +0000 (14:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Mar 2013 23:33:05 +0000 (16:33 -0700)
commitc0f5ecee4e741667b2493c742b60b6218d40b3aa
tree64f1a695a53a28eaaebe90a0816746d28ab63511
parenta57e82a18779ab8a5e5a1f5841cef937cf578913
USB: cdc-wdm: fix buffer overflow

The buffer for responses must not overflow.
If this would happen, set a flag, drop the data and return
an error after user space has read all remaining data.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
CC: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c