mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 10:12:16 +09:00
usb: gadget: fsl_qe_udc: off by one in setup_received_handle()
commit7442e6db5bupstream. The udc->eps[] array has USB_MAX_ENDPOINTS elements so > should be >=. Fixes:3948f0e0c9('usb: add Freescale QE/CPM USB peripheral controller driver') Acked-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
391738b9a3
commit
e9caf24cdf
@@ -2053,7 +2053,7 @@ static void setup_received_handle(struct qe_udc *udc,
|
||||
struct qe_ep *ep;
|
||||
|
||||
if (wValue != 0 || wLength != 0
|
||||
|| pipe > USB_MAX_ENDPOINTS)
|
||||
|| pipe >= USB_MAX_ENDPOINTS)
|
||||
break;
|
||||
ep = &udc->eps[pipe];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user