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)?

Best regards,

  Daniel

-- 
Dipl.-Math. Daniel Glöckner, emlix GmbH, http://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11,
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke
Ust-IdNr.: DE 205 198 055

emlix - your embedded linux partner

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

Reply via email to