You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2019. It is now read-only.
Indenting all of the code by four spaces and adding an empty line before the first line of code
Wrapping the code in three backticks: ```
"GitHub flavored markdown" also allows you to include syntax highlighting by placing the first set of backticks on it's own line along with the language the code should be treated as (e.g. ```diff) as described here
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Reported by: daniel danzberger
Date: 2013-02-18
Link: https://sourceforge.net/p/usbip/discussion/418507/thread/af21439c/
Description: "invalid read lengths < 4 bytes on some urbs. Causes some devices to not respond on this urb."
Proposed fix (to be validated):
Index: busenum.c
-- busenum.c (revision 201)
+++ busenum.c (working copy)
@@ -832,15 +832,23 @@
CHECK_SIZE_READ
++ len = req->TransferBufferLength;
++
++ /* minimal read len is 4 bytes */
++ if (len != 0 && len < 4)
++ len = 4;
++
set_cmd_submit_usbip_header (h,
seqnum, devid,
USBIP_DIR_IN, 0,
-- USBD_SHORT_TRANSFER_OK, req->TransferBufferLength);
++ USBD_SHORT_TRANSFER_OK,
++ len
++ );
build_setup_packet(setup,
USBIP_DIR_IN,
BMREQUEST_STANDARD, BMREQUEST_TO_DEVICE, USB_REQUEST_GET_DESCRIPTOR);
-- setup->wLength = (unsigned short)req->TransferBufferLength;
++ setup->wLength = (unsigned short)len;
setup->wValue = (req->DescriptorType<<8) | req->Index;
switch(req->DescriptorType){
Index: busenum.h
The text was updated successfully, but these errors were encountered: