summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat/vmstat.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-12-19 09:22:55 +0000
committerderaadt <deraadt@openbsd.org>1997-12-19 09:22:55 +0000
commit45bde984976f16104271fb14055ec34307154adf (patch)
tree61193915f43d9c8a1cc678840b8bbbe5fdfa9966 /usr.bin/systat/vmstat.c
parentmake mountd abort if getfh() not supported. reported by newsham@secnet.com, fixed by me (diff)
downloadwireguard-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.c7
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);
}