src/usb.c: Only allow hex characters in CONN_USB_VIDPID.

(and also allow case-insensitive specification)

Thanks to Hannu Vuolasaho for the fix.
This commit is contained in:
Uwe Hermann 2015-12-27 12:26:06 +01:00
parent 52fb2d4484
commit 039a2fd78a
1 changed files with 1 additions and 1 deletions

View File

@ -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"