diff options
Diffstat (limited to 'resolv/gethnamaddr.c')
-rw-r--r-- | resolv/gethnamaddr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c index 424a6690ee..114875b910 100644 --- a/resolv/gethnamaddr.c +++ b/resolv/gethnamaddr.c @@ -513,6 +513,8 @@ gethostbyname2(name, af) if (!*cp) { if (*--cp == '.') break; + if (!strchr(name, ':')) + break; /* * All-IPv6-legal, no dot at the end. * Fake up a hostent as if we'd actually |