]> sigrok.org Git - libsigrok.git/commitdiff
src/usb.c: Only allow hex characters in CONN_USB_VIDPID.
authorUwe Hermann <redacted>
Sun, 27 Dec 2015 11:26:06 +0000 (12:26 +0100)
committerUwe Hermann <redacted>
Tue, 29 Dec 2015 12:21:01 +0000 (13:21 +0100)
(and also allow case-insensitive specification)

Thanks to Hannu Vuolasaho for the fix.

src/usb.c

index c3c34e009b2583d59750311e3309ceb316de4ecb..35a3e80ed58cc7d340317b1aeea116ba4d1f2d83 100644 (file)
--- a/src/usb.c
+++ b/src/usb.c
@@ -28,7 +28,7 @@
 #include "libsigrok-internal.h"
 
 /* SR_CONF_CONN takes one of these: */
-#define CONN_USB_VIDPID  "^([0-9a-z]{4})\\.([0-9a-z]{4})$"
+#define CONN_USB_VIDPID  "^([0-9a-fA-F]{4})\\.([0-9a-fA-F]{4})$"
 #define CONN_USB_BUSADDR "^(\\d+)\\.(\\d+)$"
 
 #define LOG_PREFIX "usb"