From: Ye Li Date: Tue, 18 Aug 2020 10:16:45 +0000 (+0800) Subject: f_sdp: Fix wrong usb request size X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/%7B%7B%20.Permalink%20%7D%7D?a=commitdiff_plain;h=5dee7f0b0233f8b4e43e1212a6a96cdee835a8e6;p=u-boot.git f_sdp: Fix wrong usb request size Because the buffer length of sdp usb request is 65, we have to allocate 65 bytes not 64 bytes. Otherwise there is potential buffer overflow. Signed-off-by: Ye Li Signed-off-by: Peng Fan Reviewed-by: Lukasz Majewski --- diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index f971ccdeca..eec7560fc2 100644 --- a/drivers/usb/gadget/f_sdp.c +++ b/drivers/usb/gadget/f_sdp.c @@ -548,7 +548,7 @@ static struct usb_request *sdp_start_ep(struct usb_ep *ep) { struct usb_request *req; - req = alloc_ep_req(ep, 64); + req = alloc_ep_req(ep, 65); debug("%s: ep:%p req:%p\n", __func__, ep, req); if (!req)