diff options
| author | Ye Li <[email protected]> | 2020-08-18 18:16:45 +0800 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2020-09-01 14:47:43 +0200 |
| commit | 5dee7f0b0233f8b4e43e1212a6a96cdee835a8e6 (patch) | |
| tree | 7155ed79b7378a7cb496e37cfe363da62230b134 | |
| parent | d10d429112b78c69099c57fa219230539502e543 (diff) | |
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 <[email protected]>
Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Lukasz Majewski <[email protected]>
| -rw-r--r-- | drivers/usb/gadget/f_sdp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index f971ccdeca8..eec7560fc2a 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) |
