From 2ec0453929d48ca4b7c361101d6cf0d99633aa2a Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 16 Jan 2006 11:54:07 +0000 Subject: [PATCH] Restore use of strncpy(), as there is later unconditional termination of the string, and reliance on the returned pointer. Found by: bde (tm) --- lib/libutil/login_times.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libutil/login_times.c b/lib/libutil/login_times.c index fda358523a67..10e88dd5a5f3 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]);