usb: musb: gadget: misplaced out of bounds check
Greg Kroah-Hartman
maintainerQuoted 10 lines · Bin Liu
From: Heinrich Schuchardt <[email protected]>
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 <[email protected]>Signed-off-by Bin Liu <[email protected]>--- drivers/usb/musb/musb_gadget_ep0.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-)
Should this also go to the stable kernels?
thanks,
greg k-h
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html