usb gadget: uvc: use capped length value
Subsystems (2)
PATCH 1/1 usb gadget: uvc: use capped length value
"req->length" is a capped version of "data->length".
Signed-off-by Dan Carpenter <[email protected]>
---
Static analysis. I have not tested this.
drivers/usb/gadget/uvc_v4l2.c +1 -1
@@ -43,7 +43,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data) req->zero = data->length < uvc->event_length; req->dma =DMA_ADDR_INVALID ; -memcpy (req->buf, data->data, data->length); +memcpy (req->buf, data->data, req->length);return usb_ep_queue (cdev->gadget->ep0, req,GFP_KERNEL ); }
Hi Dan,
Thanks for the patch.
Quoted 3 lines · On Thursday 14 March 2013 11:01:05 Dan Carpenter wrote:
"
req->length" is a capped version of "data->length".Signed-off-by Dan Carpenter <[email protected]>
Good catch.
Acked-by Laurent Pinchart <[email protected]>
Felipe, could you please pick this one up (I can of course send you a pull request if preferred) ?
Quoted 16 lines
---
Static analysis. I have not tested this.drivers/usb/gadget/uvc_v4l2.c +1
-1@@ -43,7 +43,7 @@ uvc_send_response(struct uvc_device *uvc, struct uvc_request_data *data) req->zero = data->length < uvc->event_length; req->dma =DMA_ADDR_INVALID ; -memcpy (req->buf, data->data, data->length); +memcpy (req->buf, data->data, req->length);return usb_ep_queue (cdev->gadget->ep0, req,GFP_KERNEL ); }
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 7 lines · Laurent Pinchart
Hi Dan,
Thanks for the patch.
Quoted 2 lines · On Thursday 14 March 2013 11:01:05 Dan Carpenter wrote:
"
req->length" is a capped version of "data->length".
Quoted 8 lines
Quoted 1 line
Signed-off-by Dan Carpenter <[email protected]>Good catch.
Acked-by Laurent Pinchart <[email protected]>Felipe, could you please pick this one up (I can of course send you a pull request if preferred) ?
sure thing, no need to worry with building a branch ;-)
Signature · 1 line
balbi