about summary refs log tree commit diff
path: root/nis/nss_nis/nis-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis/nis-service.c')
-rw-r--r--nis/nss_nis/nis-service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nis/nss_nis/nis-service.c b/nis/nss_nis/nis-service.c
index c55b3e0191..0aa35cc34b 100644
--- a/nis/nss_nis/nis-service.c
+++ b/nis/nss_nis/nis-service.c
@@ -168,7 +168,7 @@ internal_nis_getservent_r (struct servent *serv, char *buffer,
     {
       if (data->next == NULL)
 	return NSS_STATUS_NOTFOUND;
-      p = strcpy (buffer, data->next->val);
+      p = strncpy (buffer, data->next->val, buflen);
            while (isspace (*p))
         ++p;