diff options
-rw-r--r-- | avahi-core/domain-util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/avahi-core/domain-util.c b/avahi-core/domain-util.c index ab1ec8d..3aeba12 100644 --- a/avahi-core/domain-util.c +++ b/avahi-core/domain-util.c @@ -42,7 +42,10 @@ static void strip_bad_chars(char *s) { s[strcspn(s, ".")] = 0; for (p = s, d = s; *p; p++) - if (isalnum(*p) || *p == '-') + if ((*p >= 'a' && *p <= 'z') || + (*p >= 'A' && *p <= 'Z') || + (*p >= '0' && *p <= '9') || + *p == '-') *(d++) = *p; *d = 0; |