From 67be4a8f2585c8af423e358efc4934291880a900 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 11 Mar 2023 00:02:45 -0800 Subject: 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 --- lib/gshadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gshadow.c b/lib/gshadow.c index c17af67f..ca14449a 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) { -- cgit v1.2.3