udevGetUintProperty was called with base set to 0 for busnum and devnum.
With base 0 strtoul parses the number as octal if it start with a 0. But
busnum and devnum are decimal and udev returns them padded with leading
zeros. So strtoul parses them as octal. This works for certain decimal
values like 001-007, but fails for values like 008.
Change udevProcessUSBDevice to use base 10 for busnum and devnum.
if (udevGetUintProperty(device,
"BUSNUM",
&data->usb_dev.bus,
- 0) == PROPERTY_ERROR) {
+ 10) == PROPERTY_ERROR) {
goto out;
}
if (udevGetUintProperty(device,
"DEVNUM",
&data->usb_dev.device,
- 0) == PROPERTY_ERROR) {
+ 10) == PROPERTY_ERROR) {
goto out;
}