summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-19 09:34:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1997-12-19 09:34:47 +0000
commit48b79355e8158dba87f3c34b2173ce2a85987682 (patch)
tree0c19a3dc453153f6594febdb6ba3075143dba99e
parentfe870a825c984aa6e46f6d9eb66b96842eb4bb75 (diff)
comment this strncpy is safe
-rw-r--r--usr.bin/systat/vmstat.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index a8694e20ad4..2c5c5aa521e 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmstat.c,v 1.13 1997/12/19 09:22:56 deraadt Exp $ */
+/* $OpenBSD: vmstat.c,v 1.14 1997/12/19 09:34:46 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.13 1997/12/19 09:22:56 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: vmstat.c,v 1.14 1997/12/19 09:34:46 deraadt Exp $";
#endif /* not lint */
/*
@@ -251,6 +251,7 @@ initkre()
while (ihp) {
KREAD(ihp, &ih, sizeof(ih));
KREAD(ih.ih_what, iname, 16);
+ /* XXX strcpy is safe, sized & malloc'd buffer */
strcpy(intrname[n++] = intrnamebuf + namelen, iname);
namelen += 1 + strlen(iname);
ihp = ih.ih_next;