Re: [PATCH] usb: musb: gadget: misplaced out of bounds check

2018-03-29 Thread Bin Liu
On Thu, Mar 29, 2018 at 06:36:42PM +0200, Greg Kroah-Hartman wrote: > On Thu, Mar 29, 2018 at 10:48:28AM -0500, Bin Liu wrote: > > From: Heinrich Schuchardt > > > > musb->endpoints[] has array size MUSB_C_NUM_EPS. > > We must check array bounds before accessing the array and not afterwards. > >

Re: [PATCH] usb: musb: gadget: misplaced out of bounds check

2018-03-29 Thread Greg Kroah-Hartman
On Thu, Mar 29, 2018 at 10:48:28AM -0500, Bin Liu wrote: > From: Heinrich Schuchardt > > musb->endpoints[] has array size MUSB_C_NUM_EPS. > We must check array bounds before accessing the array and not afterwards. > > Signed-off-by: Heinrich Schuchardt > Signed-off-by: Bin Liu > --- > drivers

[PATCH] usb: musb: gadget: misplaced out of bounds check

2018-03-29 Thread Bin Liu
From: Heinrich Schuchardt musb->endpoints[] has array size MUSB_C_NUM_EPS. We must check array bounds before accessing the array and not afterwards. Signed-off-by: Heinrich Schuchardt Signed-off-by: Bin Liu --- drivers/usb/musb/musb_gadget_ep0.c | 14 +- 1 file changed, 9 insertio