Refactored parsing of usb dev: command line option
authorLukas Fink <lukas.fink1@gmail.com>
Sun, 19 Apr 2020 01:01:32 +0000 (03:01 +0200)
committerakallabeth <akallabeth@users.noreply.github.com>
Tue, 28 Apr 2020 12:03:19 +0000 (14:03 +0200)
commitaf6aa500208e0bba2f144e21149aa0a3ed3e5012
tree75568a938a022cf56db378e0b9bc1089abf80a15
parent216f03c849c78cf1f084a615f3da9978899931a6
Refactored parsing of usb dev: command line option

Refactored urbdrc_udevman_register_devices with its helper functions,
because the old implementation was a bit quirky. Removed a unsafe
strcpy, that led to a buffer overflow when given misonstructed command
line options. Doing something like "/usb:id,dev:1234:1234##abcd:abcd"
won't work anymore, too.
channels/urbdrc/client/libusb/libusb_udevman.c