USB: cxacru: potential underflow in cxacru_cm_get_array()
authorDan Carpenter <dan.carpenter@oracle.com>
Sun, 19 May 2013 18:52:20 +0000 (21:52 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Jun 2013 19:52:25 +0000 (12:52 -0700)
commitac68bccce92ef21afe2e506ef48954c6e7695f7e
tree59b73c9de1fd09c4c3b421ca09e7435321c44557
parent08edd1c29f29e51f8ac32995b561578c1ec958f7
USB: cxacru: potential underflow in cxacru_cm_get_array()

commit 2a0ebf80aa95cc758d4725f74a7016e992606a39 upstream.

The value of "offd" comes off the instance->rcv_buf[] and we used it as
the offset into an array.  The problem is that we check the upper bound
but not for negative values.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/atm/cxacru.c