gregkh / usbutils

USB utilities for Linux, including lsusb
http://www.linux-usb.org
354 stars 199 forks source link

usbmisc: fix possible stack-buffer-overflow #191

Open Drawishe opened 2 months ago

Drawishe commented 2 months ago

Running lsusb with -D argument and path, which len is more than PATH_MAX + 1, cause stack-buffer-overflow because of copy to the buf a string without null-terminator Force setting 0 byte to the end of the buf fixes this error.