On Wed, Jun 17, 2020 at 09:40:56PM +0200, Daniel Glöckner wrote:
> Hello Sascha,
> 
> Am 17.06.20 um 10:11 schrieb Sascha Hauer:
> > -   *(cmdbuf + req->actual) = 0;
> > -   fastboot_exec_cmd(&f_fb->fastboot, cmdbuf);
> > -   *cmdbuf = '\0';
> > -   req->actual = 0;
> > -   memset(req->buf, 0, EP_BUFFER_SIZE);
> > -   usb_ep_queue(ep, req);
> > +   w = xzalloc(sizeof(*w));
> > +   w->f_fb = f_fb;
> > +
> > +   memcpy(w->command, req->buf, req->actual);
> > +
> > +   wq_queue_work(&f_fb->wq, &w->work);
> 
> Do we need to check if req->actual < sizeof(w->command)?

Yes, will add.

Regards,
 Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to