Matthias Bußjäger
2017-02-23 11:41:28 UTC
Hello,
yesterday I updated from libusb 1.0.20 to libusb 1.0.21 and ran into a
NULL pointer exception.
I also pulled the up to date sources from github and compiled it to
check if the problem still exists - and it did.
The problem exists in function windows_get_config_descriptor_by_value,
but should already have been avoided with the checks in the function
cache_config_descriptors.
Unfortunately there seem to exist cases that need an additional check:
I added a NULL pointer check in static int
windows_get_config_descriptor_by_value and could access all the USB
devices like before with version 1.0.20.
The device leading to this strange behavior was an Evoluent
VerticalMouse. It worked (!), but there obviously was a problem with the
configuration descriptor for libusb and I couldn't get further
information than available in the device descriptor.
I then unplugged this device and inserted it again - and the problem was
gone. My added NULL pointer check wasn't necessary any more.
I also can't reproduce this problem again and therefore I currently
didn't make a pull request for the fix yet.
My question is now: Should I make a pull request for the additional check?
I would like to do that because I had the problem that version 1.0.20
was more stable than the current one. And I think it should not get more
unstable, also in case of device specific problems or similar. But
unfortunately I can't provide a guide to reproduce this problem.
I made some screenshots before the unplug that show some values while
debugging with visual studio, that's all I could provide.
Best regards,
Matthias
yesterday I updated from libusb 1.0.20 to libusb 1.0.21 and ran into a
NULL pointer exception.
I also pulled the up to date sources from github and compiled it to
check if the problem still exists - and it did.
The problem exists in function windows_get_config_descriptor_by_value,
but should already have been avoided with the checks in the function
cache_config_descriptors.
Unfortunately there seem to exist cases that need an additional check:
I added a NULL pointer check in static int
windows_get_config_descriptor_by_value and could access all the USB
devices like before with version 1.0.20.
The device leading to this strange behavior was an Evoluent
VerticalMouse. It worked (!), but there obviously was a problem with the
configuration descriptor for libusb and I couldn't get further
information than available in the device descriptor.
I then unplugged this device and inserted it again - and the problem was
gone. My added NULL pointer check wasn't necessary any more.
I also can't reproduce this problem again and therefore I currently
didn't make a pull request for the fix yet.
My question is now: Should I make a pull request for the additional check?
I would like to do that because I had the problem that version 1.0.20
was more stable than the current one. And I think it should not get more
unstable, also in case of device specific problems or similar. But
unfortunately I can't provide a guide to reproduce this problem.
I made some screenshots before the unplug that show some values while
debugging with visual studio, that's all I could provide.
Best regards,
Matthias