Messages in this thread | | | Date | Tue, 20 Mar 2018 13:55:55 -0500 | From | Bin Liu <> | Subject | Re: [PATCH v3 1/1] usb: musb: gadget: misplaced out of bounds check |
| |
Hi,
On Tue, Mar 20, 2018 at 07:42:48PM +0100, Heinrich Schuchardt wrote: > 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 <xypron.glpk@gmx.de> > --- > v3 > Remove superfluous braces. > v2 > Only the 4 low bits of epnum are relevant for indexing. > --- > drivers/usb/musb/musb_gadget_ep0.c | 14 +++++++++----- > 1 file changed, 9 insertions(+), 5 deletions(-)
Applied. Thanks.
Regards, -Bin.
| |