MadLittleMods / node-usb-detection

List USB devices in system and detect changes on them.
MIT License
371 stars 114 forks source link

Crash on Ubuntu 18.04 #155

Open crogerscare opened 2 years ago

crogerscare commented 2 years ago

We have an Onyx Venus system with a button that disables and enables the touchscreen. It does this by removing the power to the USB port. If this button is hit multiple types, we eventually get a segfault because strtol() is called from usb-detection with the first parameter set to NULL.

Look at GetProperties() in detection_linux.cpp, there is no NULL check for udev_device_get_sysattr_value(dev,"idVendor") or udev_device_get_sysattr_value(dev,"idProduct"). So it looks like one or both of these calls is returning NULL.