diff options
author | delphij <delphij@FreeBSD.org> | 2008-10-17 21:21:14 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2008-10-17 21:21:14 +0000 |
commit | 767e2acdc70d46a3950466a91899ee6e591ec838 (patch) | |
tree | 12320fe97bf01eb2e86983f6662e0a61f3d8d27b /lib/libutil/login_times.c | |
parent | cbecb62bfe4d08b1c22267fd67b968fa8d80de73 (diff) | |
download | FreeBSD-src-767e2acdc70d46a3950466a91899ee6e591ec838.zip FreeBSD-src-767e2acdc70d46a3950466a91899ee6e591ec838.tar.gz |
Use strlcpy() when we mean it.
Diffstat (limited to 'lib/libutil/login_times.c')
-rw-r--r-- | lib/libutil/login_times.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libutil/login_times.c b/lib/libutil/login_times.c index 10e88dd..0c64e93 100644 --- a/lib/libutil/login_times.c +++ b/lib/libutil/login_times.c @@ -72,8 +72,7 @@ parse_lt(const char * str) char buf[64]; /* Make local copy and force lowercase to simplify parsing */ - p = strncpy(buf, str, sizeof buf); - buf[sizeof buf - 1] = '\0'; + p = strlcpy(buf, str, sizeof buf); for (i = 0; buf[i]; i++) buf[i] = (char)tolower(buf[i]); |