summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2023-03-11 00:02:45 -0800
committerAlejandro Colomar <alx@kernel.org>2023-03-12 13:25:10 +0100
commit67be4a8f2585c8af423e358efc4934291880a900 (patch)
treed3282390fcb2164768e4b16c7ca3c54dfa612634
parentf24bf2ce7ad9bcba4a7b8616e45e3a6875934228 (diff)
Prefer strcpy(3) to strlcpy(3) when either workspaul1
* 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>
-rw-r--r--lib/gshadow.c2
1 files changed, 1 insertions, 1 deletions
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) {