Unverified Commit 6fd817eb authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!12068 usb: gadget: aspeed_udc: validate endpoint index for ast udc

parents e38f2de6 4df36a66
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1009,6 +1009,8 @@ static void ast_udc_getstatus(struct ast_udc_dev *udc)
		break;
	case USB_RECIP_ENDPOINT:
		epnum = crq.wIndex & USB_ENDPOINT_NUMBER_MASK;
		if (epnum >= AST_UDC_NUM_ENDPOINTS)
			goto stall;
		status = udc->ep[epnum].stopped;
		break;
	default: