summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wins.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/nsswitch/wins.c b/nsswitch/wins.c
index 3243ffb5bff..22524e46461 100644
--- a/nsswitch/wins.c
+++ b/nsswitch/wins.c
@@ -47,7 +47,7 @@ NSS_STATUS _nss_wins_gethostbyname2_r(const char *name, int af, struct hostent *
static char *lookup_byname_backend(const char *name)
{
const char *p;
- char *ip;
+ char *ip, *ipp;
size_t nbt_len;
wbcErr result;
@@ -65,6 +65,11 @@ static char *lookup_byname_backend(const char *name)
return NULL;
}
+ ipp = strchr(ip, '\t');
+ if (ipp != NULL) {
+ *ipp = '\0';
+ }
+
return ip;
}