extcap: Allow ASCII '0' in preference name
authorStig Bjørlykke <stig@bjorlykke.org>
Tue, 13 Nov 2018 11:40:45 +0000 (12:40 +0100)
committerAnders Broman <a.broman58@gmail.com>
Tue, 13 Nov 2018 14:51:32 +0000 (14:51 +0000)
Update the regex to also allow '0' in the preference name.

Change-Id: I881079b579b9193dd31dda2150d9a50c000c0dd3
Reviewed-on: https://code.wireshark.org/review/30602
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
extcap.c

index 4c8c7488859d60a914234b16ad0af954f429907c..ed3288be7b7d09bb729470d70736df136527cf0e 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -698,7 +698,7 @@ extcap_pref_for_argument(const gchar *ifname, struct _extcap_arg *arg)
     struct preference *pref = NULL;
 
     GRegex *regex_name = g_regex_new("[-]+", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, NULL);
-    GRegex *regex_ifname = g_regex_new("(?![a-zA-Z1-9_]).", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, NULL);
+    GRegex *regex_ifname = g_regex_new("(?![a-zA-Z0-9_]).", (GRegexCompileFlags) 0, (GRegexMatchFlags) 0, NULL);
     if (regex_name && regex_ifname)
     {
         if (prefs_find_module("extcap"))