libusb: fix size of control messages

Fixes genodelabs/genode#4230
This commit is contained in:
Johannes Schlatow 2021-07-21 18:30:35 +02:00 committed by Christian Helmuth
parent 3d36291d7f
commit b51b9e1ef3

View File

@ -549,7 +549,7 @@ static int genode_submit_transfer(struct usbi_transfer * itransfer)
Usb::Packet_descriptor p;
try {
p = usb_device->usb_connection.source()->alloc_packet(transfer->length);
p = usb_device->usb_connection.source()->alloc_packet(setup->wLength);
} catch (Usb::Session::Tx::Source::Packet_alloc_failed) {
return LIBUSB_ERROR_BUSY;
}