linux_usbfs: Fix parsing of descriptors for multi-configuration devices
authorChris Dickens <christopher.a.dickens@gmail.com>
Sun, 13 Dec 2020 23:49:19 +0000 (15:49 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Sun, 13 Dec 2020 23:49:19 +0000 (15:49 -0800)
commitf6d2cb561402c3b6d3627c0eb89e009b503d9067
tree4e2f614c529a20a533d72c1028de1d045e433714
parent369af149e3ad92514a2d24f112cedfeb7acaf558
linux_usbfs: Fix parsing of descriptors for multi-configuration devices

Commit e2be556bd2 ("linux_usbfs: Parse config descriptors during device
initialization") introduced a regression for devices with multiple
configurations. The logic that verifies the reported length of the
configuration descriptors failed to count the length of the
configuration descriptor itself and would truncate the actual length by
9 bytes, leading to a parsing error for subsequent descriptors.

Closes #825

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/linux_usbfs.c
libusb/version_nano.h