diff options
| author | Doug Barton <dougb@FreeBSD.org> | 2010-12-18 00:30:52 +0000 |
|---|---|---|
| committer | Doug Barton <dougb@FreeBSD.org> | 2010-12-18 00:30:52 +0000 |
| commit | 34aba78b16334b192f3c1f9e6e07d864ec18d939 (patch) | |
| tree | d44e7eb13c5c5b525c7323f602ac3bc507b62686 /usr.bin/stat | |
| parent | 8c22654d7e84fa0883058d9cb89b2b9c76556747 (diff) | |
Notes
Diffstat (limited to 'usr.bin/stat')
| -rw-r--r-- | usr.bin/stat/stat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c index f661f30d3bdd6..b2ba03ff10478 100644 --- a/usr.bin/stat/stat.c +++ b/usr.bin/stat/stat.c @@ -30,7 +30,7 @@ #include <sys/cdefs.h> #if 0 #ifndef lint -__RCSID("$NetBSD: stat.c,v 1.30 2010/11/25 04:33:30 dholland Exp $" +__RCSID("$NetBSD: stat.c,v 1.31 2010/12/16 05:30:16 dholland Exp $" "$OpenBSD: stat.c,v 1.14 2009/06/24 09:44:25 sobrado Exp $"); #endif #endif @@ -789,7 +789,7 @@ format1(const struct stat *st, small = 0; data = 0; if (file == NULL) { - (void)strncpy(path, "(stdin)", sizeof(path)); + (void)strlcpy(path, "(stdin)", sizeof(path)); sdata = path; } else { snprintf(path, sizeof(path), " -> "); @@ -877,7 +877,7 @@ format1(const struct stat *st, case SHOW_filename: small = 0; data = 0; - (void)strncpy(path, file, sizeof(path)); + (void)strlcpy(path, file, sizeof(path)); sdata = path; formats = FMTF_STRING; if (ofmt == 0) |
