Menu

#16 allow zero length control transfer (without buffer)

Unstable_(example)
closed
nobody
None
1
2021-10-14
2021-10-13
No

Using for instance libusbk.dll 3.0.7.0 (the version currently installed with Zadig) a control transfer with zero length will fail (see https://github.com/libusb/libusb/issues/1006). I suspect this is due to the check on transfer_buffer_mdl in src/driver/ioctl.c since the same check for bulk transfer write is explicitly not done. The second patch changes the control transfer check to be consistent to the bulk transfer check.

The first patch just adds missing debug tags. The second patch applies on top.

I don't have the setup to rebuild and test libusb0.sys so I can only assume this is correct without verification by own testing. BTW this issue doesn't show when using the recently released libusbk.dll 3.0.8.0 because the control transfers are done differently here.

Driver error message caught with DebugView:
libusb0-sys:err [dispatch_ioctl] (null): invalid transfer request

2 Attachments

Discussion

  • Xiaofan Chen

    Xiaofan Chen - 2021-10-13

    Thanks. We no longer use Sourceforge for development. Please use github instead. Thanks.

    Ref: https://github.com/mcuee/libusb-win32/issues/21

     
  • Xiaofan Chen

    Xiaofan Chen - 2021-10-14
    • status: open --> closed
     

Log in to post a comment.