summaryrefslogtreecommitdiffstats
path: root/lib/libutil/login_times.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2006-01-16 11:54:07 +0000
committerrwatson <rwatson@FreeBSD.org>2006-01-16 11:54:07 +0000
commit2ec0453929d48ca4b7c361101d6cf0d99633aa2a (patch)
treeba1dcee327e76894c6b3664fab73354999731c8b /lib/libutil/login_times.c
parent78d93723e6f7d54632d4a08c9a4630e0f0f1d79a (diff)
downloadFreeBSD-src-2ec0453929d48ca4b7c361101d6cf0d99633aa2a.zip
FreeBSD-src-2ec0453929d48ca4b7c361101d6cf0d99633aa2a.tar.gz
Restore use of strncpy(), as there is later unconditional termination
of the string, and reliance on the returned pointer. Found by: bde (tm)
Diffstat (limited to 'lib/libutil/login_times.c')
-rw-r--r--lib/libutil/login_times.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/login_times.c b/lib/libutil/login_times.c
index fda3585..10e88dd 100644
--- a/lib/libutil/login_times.c
+++ b/lib/libutil/login_times.c
@@ -72,7 +72,7 @@ parse_lt(const char * str)
char buf[64];
/* Make local copy and force lowercase to simplify parsing */
- p = strlcpy(buf, str, sizeof buf);
+ p = strncpy(buf, str, sizeof buf);
buf[sizeof buf - 1] = '\0';
for (i = 0; buf[i]; i++)
buf[i] = (char)tolower(buf[i]);
OpenPOWER on IntegriCloud