diff options
author | 1997-12-19 09:22:55 +0000 | |
---|---|---|
committer | 1997-12-19 09:22:55 +0000 | |
commit | 45bde984976f16104271fb14055ec34307154adf (patch) | |
tree | 61193915f43d9c8a1cc678840b8bbbe5fdfa9966 /usr.bin/systat/vmstat.c | |
parent | make mountd abort if getfh() not supported. reported by newsham@secnet.com, fixed by me (diff) | |
download | wireguard-openbsd-45bde984976f16104271fb14055ec34307154adf.tar.xz wireguard-openbsd-45bde984976f16104271fb14055ec34307154adf.zip |
proactive buffer blocks
Diffstat (limited to 'usr.bin/systat/vmstat.c')
-rw-r--r-- | usr.bin/systat/vmstat.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index 7da0c31fcfa..a8694e20ad4 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.12 1997/12/19 09:03:34 deraadt Exp $ */ +/* $OpenBSD: vmstat.c,v 1.13 1997/12/19 09:22:56 deraadt Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif -static char rcsid[] = "$OpenBSD: vmstat.c,v 1.12 1997/12/19 09:03:34 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: vmstat.c,v 1.13 1997/12/19 09:22:56 deraadt Exp $"; #endif /* not lint */ /* @@ -298,7 +298,8 @@ fetchkre() time_t now; time(&now); - strcpy(buf, ctime(&now)); + strncpy(buf, ctime(&now), sizeof buf-1); + buf[sizeof buf-1] = '\0'; getinfo(&s, state); } |