diff options
author | 2005-04-11 08:19:07 +0000 | |
---|---|---|
committer | 2005-04-11 08:19:07 +0000 | |
commit | 23f91ea0606e60885482094194a5c5b37c07a455 (patch) | |
tree | 85ef5c6826c9fd9b173f80bcda0a09e80a151063 /usr.bin | |
parent | getting tired of explaining this: snprintf does not return how many (diff) | |
download | wireguard-openbsd-23f91ea0606e60885482094194a5c5b37c07a455.tar.xz wireguard-openbsd-23f91ea0606e60885482094194a5c5b37c07a455.zip |
pass size of right buffer to strlcat. ok deraadt@
Diffstat (limited to 'usr.bin')
-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 a22fb934e66..f106d734db9 100644 --- a/usr.bin/stat/stat.c +++ b/usr.bin/stat/stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stat.c,v 1.8 2005/04/11 08:14:26 deraadt Exp $ */ +/* $OpenBSD: stat.c,v 1.9 2005/04/11 08:19:07 otto Exp $ */ /* $NetBSD: stat.c,v 1.19 2004/06/20 22:20:16 jmc Exp $ */ /* @@ -39,7 +39,7 @@ #ifndef lint static const char rccs_id[] = - "$OpenBSD: stat.c,v 1.8 2005/04/11 08:14:26 deraadt Exp $"; + "$OpenBSD: stat.c,v 1.9 2005/04/11 08:19:07 otto Exp $"; #endif #include <sys/types.h> @@ -888,7 +888,7 @@ format1(const struct stat *st, if (l >= blen) return (l); for (; prec > 9 && l < blen; prec--, l++) - (void)strlcat(buf, "0", sizeof(lfmt)); + (void)strlcat(buf, "0", blen); return (l); } |