diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-19 09:22:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-19 09:22:57 +0000 |
commit | fe870a825c984aa6e46f6d9eb66b96842eb4bb75 (patch) | |
tree | 86b616baecf39e8632dc29ce1c2112612d418904 /usr.bin/systat/vmstat.c | |
parent | da9d6e837abc403f767af9ab8407d416a823de6a (diff) |
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); } |