(internal_nis_getetherent_r): Use strncpy instead of strcpy for
authordrepper <drepper>
Mon, 22 Dec 1997 17:46:07 +0000 (17:46 +0000)
committerdrepper <drepper>
Mon, 22 Dec 1997 17:46:07 +0000 (17:46 +0000)
security.

nis/nss_nis/nis-ethers.c

index 365f9c9..cbc3759 100644 (file)
@@ -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;