diff options
Diffstat (limited to 'nss/digits_dots.c')
-rw-r--r-- | nss/digits_dots.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/nss/digits_dots.c b/nss/digits_dots.c index c953fc6..e1baafa 100644 --- a/nss/digits_dots.c +++ b/nss/digits_dots.c @@ -159,7 +159,8 @@ } } - if (isxdigit (name[0]) || name[0] == ':') + if ((isxdigit (name[0]) && strchr (name, ':') != NULL) + || name[0] == ':') { const char *cp; char *hostname; @@ -238,8 +239,6 @@ { if (*--cp == '.') break; - if (!strchr (name, ':')) - break; /* All-IPv6-legal, no dot at the end. Fake up a hostent as if we'd actually done a lookup. */ |