summaryrefslogtreecommitdiff
path: root/nis/nss_nis
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nis')
-rw-r--r--nis/nss_nis/nis-ethers.c2
-rw-r--r--nis/nss_nis/nis-proto.c2
-rw-r--r--nis/nss_nis/nis-rpc.c2
-rw-r--r--nis/nss_nis/nis-service.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/nis/nss_nis/nis-ethers.c b/nis/nss_nis/nis-ethers.c
index 365f9c9c1d..cbc37591ee 100644
--- a/nis/nss_nis/nis-ethers.c
+++ b/nis/nss_nis/nis-ethers.c
@@ -159,7 +159,7 @@ internal_nis_getetherent_r (struct ether *eth, char *buffer, size_t buflen,
if (next == NULL)
return NSS_STATUS_NOTFOUND;
- p = strcpy (buffer, next->val);
+ p = strncpy (buffer, next->val, buflen);
while (isspace (*p))
++p;
diff --git a/nis/nss_nis/nis-proto.c b/nis/nss_nis/nis-proto.c
index e0c976041d..a6f57fde98 100644
--- a/nis/nss_nis/nis-proto.c
+++ b/nis/nss_nis/nis-proto.c
@@ -151,7 +151,7 @@ internal_nis_getprotoent_r (struct protoent *proto,
if (next == NULL)
return NSS_STATUS_NOTFOUND;
- p = strcpy (buffer, next->val);
+ p = strncpy (buffer, next->val, buflen);
while (isspace (*p))
++p;
diff --git a/nis/nss_nis/nis-rpc.c b/nis/nss_nis/nis-rpc.c
index 274ef04b7a..3be99496e4 100644
--- a/nis/nss_nis/nis-rpc.c
+++ b/nis/nss_nis/nis-rpc.c
@@ -168,7 +168,7 @@ internal_nis_getrpcent_r (struct rpcent *rpc, char *buffer, size_t buflen,
{
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;
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;