diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-10-28 11:18:40 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-10-28 18:19:15 +0000 |
commit | 8ea4df97e052f3fb0af3336990f2bef6d882b258 (patch) | |
tree | e4bfe40db402990be6cfe97abf646dc32769b7de | |
parent | bab44ad3dcb653821dce345b01e3c74ef698884b (diff) |
Use g_ascii_isalnum() rather than isalnum().
Only *ASCII* alphanumerics are allowed in filterable field names, so use
g_ascii_isalnum() to check for them. That avoids issues with characters
with the 8th bit set and avoids locale-dependent behavior.
Change-Id: I4e3c4eec907f5e576629229fcf154fcf728b7a2e
Reviewed-on: https://code.wireshark.org/review/4973
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/oids.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/oids.c b/epan/oids.c index 8bfff54e10..dbb7e79215 100644 --- a/epan/oids.c +++ b/epan/oids.c @@ -27,7 +27,6 @@ #include <glib.h> #include <stdio.h> #include <string.h> -#include <ctype.h> #include <wsutil/report_err.h> @@ -274,7 +273,7 @@ static char* alnumerize(const char* name) { char c; for (;(c = *r); r++) { - if (isalnum(c) || c == '_' || c == '-' || c == '.') { + if (g_ascii_isalnum(c) || c == '_' || c == '-' || c == '.') { *(w++) = c; } else if (c == ':' && r[1] == ':') { *(w++) = '.'; |