Open
Description
I rebased on master and force-pushed an identical change to libusb0.c.
This was compile and runtime tested, but not confirmed to fix the issue since I can't repro. I intentionally set a wrongusb_hid_rep_index
value in ups.conf and confirmed that things still broke as expected, though. A wrongusb_config_index
(1) caused a segfault, didn't look too much into it though:
0.268093 [D2] Trying to match device
0.268094 [D2] match_function_subdriver (non-SHUT mode): matching a device...
0.268095 [D3] match_function_regex: matching a device...
0.268110 [D2] Device matches
0.268118 [D3] nut_usb_set_altinterface: skipped usb_set_altinterface(udev, 0)
0.271084 [D2] Retrieved HID descriptor (expected 9, got 9)
0.271089 [D3] HID descriptor, method 1: (9 bytes) => 09 21 10 01 21 01 22 ae 01
0.271090 [D3] HID descriptor length (method 1) 430
Segmentation fault
Originally posted by @tofurky in #2611 (comment)