From: Paul Eggert Date: Sat, 11 Mar 2023 08:02:45 +0000 (-0800) Subject: Prefer strcpy(3) to strlcpy(3) when either works X-Git-Tag: 4.14.0-rc1~127 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea3d49506fb144348be10eba6f6fe1250b875a48;p=thirdparty%2Fshadow.git Prefer strcpy(3) to strlcpy(3) when either works * lib/gshadow.c (sgetsgent): Use strcpy(3) not strlcpy(3), since the string is known to fit. Signed-off-by: Paul Eggert Signed-off-by: Alejandro Colomar Reviewed-by: Iker Pedrosa --- diff --git a/lib/gshadow.c b/lib/gshadow.c index c17af67fd..ca14449ac 100644 --- a/lib/gshadow.c +++ b/lib/gshadow.c @@ -128,7 +128,7 @@ void endsgent (void) sgrbuflen = len; } - strlcpy (sgrbuf, string, len); + strcpy (sgrbuf, string); cp = strrchr (sgrbuf, '\n'); if (NULL != cp) {