hughsie / libgusb

GUsb is a GObject wrapper for libusb1
GNU Lesser General Public License v2.1
25 stars 21 forks source link

Large HID descriptors are parsed incorrectly #114

Closed GamePad64 closed 11 months ago

GamePad64 commented 11 months ago

HID descriptor size is uint16, so getting its size as buf[7] returns incorrect results, if HID descriptor is large enough.

https://github.com/hughsie/libgusb/blob/860108f261f431236aa627cba96689fb891123d8/gusb/gusb-device.c#L1384

hughsie commented 11 months ago

Have you got a link to the spec handy? We can fix for the next release.

hughsie commented 11 months ago

No worries -- it's in 6.2.1 HID Descriptor