diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-01-16 11:54:07 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-01-16 11:54:07 +0000 |
commit | 2ec0453929d48ca4b7c361101d6cf0d99633aa2a (patch) | |
tree | ba1dcee327e76894c6b3664fab73354999731c8b /lib | |
parent | 78d93723e6f7d54632d4a08c9a4630e0f0f1d79a (diff) | |
download | FreeBSD-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')
-rw-r--r-- | lib/libutil/login_times.c | 2 |
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]); |