aboutsummaryrefslogtreecommitdiff
path: root/nis/ypclnt.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/ypclnt.c')
-rw-r--r--nis/ypclnt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/nis/ypclnt.c b/nis/ypclnt.c
index 6644118..b128ad6 100644
--- a/nis/ypclnt.c
+++ b/nis/ypclnt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
@@ -167,7 +167,8 @@ __yp_bind (const char *domain, dom_binding ** ypdb)
ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_addr,
sizeof (ysd->dom_server_addr.sin_addr.s_addr));
ysd->dom_vers = YPVERS;
- strcpy (ysd->dom_domain, domain);
+ strncpy (ysd->dom_domain, domain, YPMAXDOMAIN);
+ ysd->dom_domain[YPMAXDOMAIN] = '\0';
}
if (ysd->dom_client)