From e53f7998dade881763c671ae33a3f8d81ac5ad72 Mon Sep 17 00:00:00 2001 From: Hiten Pandya Date: Mon, 10 May 2004 22:33:12 +0000 Subject: [PATCH] Use strlcpy(3) instead of strcpy(3). PR: 46761 Philipp Mergenthaler --- sbin/natd/natd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/natd/natd.c b/sbin/natd/natd.c index 67fff8019ecc..93680faeecba 100644 --- a/sbin/natd/natd.c +++ b/sbin/natd/natd.c @@ -1379,7 +1379,7 @@ void SetupPortRedirect (const char* parms) int i; struct alias_link *link = NULL; - strcpy (buf, parms); + strlcpy (buf, parms, sizeof(buf)); /* * Extract protocol. */ @@ -1510,7 +1510,7 @@ SetupProtoRedirect(const char* parms) char* protoName; struct protoent *protoent; - strcpy (buf, parms); + strlcpy (buf, parms, sizeof(buf)); /* * Extract protocol. */ @@ -1564,7 +1564,7 @@ void SetupAddressRedirect (const char* parms) char* serverPool; struct alias_link *link; - strcpy (buf, parms); + strlcpy (buf, parms, sizeof(buf)); /* * Extract local address. */