summaryrefslogtreecommitdiff
path: root/usr.bin/systat/swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/systat/swap.c')
-rw-r--r--usr.bin/systat/swap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/systat/swap.c b/usr.bin/systat/swap.c
index 9c40fa92148..f16e601299f 100644
--- a/usr.bin/systat/swap.c
+++ b/usr.bin/systat/swap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: swap.c,v 1.4 1996/06/26 05:40:11 deraadt Exp $ */
+/* $OpenBSD: swap.c,v 1.5 1996/08/06 18:48:16 deraadt Exp $ */
/* $NetBSD: swap.c,v 1.5 1996/05/10 23:16:38 thorpej Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)swap.c 8.3 (Berkeley) 4/29/95";
#endif
-static char rcsid[] = "$OpenBSD: swap.c,v 1.4 1996/06/26 05:40:11 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: swap.c,v 1.5 1996/08/06 18:48:16 deraadt Exp $";
#endif /* not lint */
/*
@@ -128,6 +128,9 @@ initswap()
strcpy(msgbuf, "systat: swap: cannot find");
for (i = 0; syms[i].n_name != NULL; i++) {
if (syms[i].n_value == 0) {
+ if (strlen(msgbuf) strlen(syms[i].n_name) +2 >
+ sizeof (msgbuf))
+ continue;
strcat(msgbuf, " ");
strcat(msgbuf, syms[i].n_name);
}