]> Git Repo - J-u-boot.git/commitdiff
f_sdp: Fix wrong usb request size
authorYe Li <[email protected]>
Tue, 18 Aug 2020 10:16:45 +0000 (18:16 +0800)
committerMarek Vasut <[email protected]>
Tue, 1 Sep 2020 12:47:43 +0000 (14:47 +0200)
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]>
drivers/usb/gadget/f_sdp.c

index f971ccdeca821e4cd7a22659a005760a76ceaab0..eec7560fc2a770a926a20e5cc7601825c38a6dbc 100644 (file)
@@ -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)
This page took 0.038808 seconds and 4 git commands to generate.