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/gitweb/?a=commitdiff_plain;h=039a2fd78a61ad8c6e9159be9ba06b605a456155;hp=52fb2d448480fd820fadff464a676e61dabc557f;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"