From: Uwe Hermann Date: Sun, 27 Dec 2015 11:26:06 +0000 (+0100) Subject: src/usb.c: Only allow hex characters in CONN_USB_VIDPID. X-Git-Tag: libsigrok-0.4.0~57 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=039a2fd78a61ad8c6e9159be9ba06b605a456155;p=libsigrok.git src/usb.c: Only allow hex characters in CONN_USB_VIDPID. (and also allow case-insensitive specification) Thanks to Hannu Vuolasaho for the fix. --- diff --git a/src/usb.c b/src/usb.c index c3c34e00..35a3e80e 100644 --- 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"