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 <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
Paul Eggert 2023-03-11 00:02:45 -08:00 committed by Iker Pedrosa
parent a926a26f0c
commit ea3d49506f
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ void endsgent (void)
sgrbuflen = len;
}
strlcpy (sgrbuf, string, len);
strcpy (sgrbuf, string);
cp = strrchr (sgrbuf, '\n');
if (NULL != cp) {