From 8841bd89aa4d8ea17a7444ad1db67d4d0b5c6c23 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 21 Dec 1997 21:15:59 +0000 Subject: [PATCH] (internal_nis_getetherent_r): Use strncpy instead of strcpy for security reasons. --- nis/nss_nis/nis-ethers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nis/nss_nis/nis-ethers.c b/nis/nss_nis/nis-ethers.c index 2d08be7967f..27a02fc1665 100644 --- a/nis/nss_nis/nis-ethers.c +++ b/nis/nss_nis/nis-ethers.c @@ -158,7 +158,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); next = next->next; while (isspace (*p)) -- 2.47.2