=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/systat/mbufs.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/systat/mbufs.c 1996/06/26 05:40:08 1.3 +++ src/usr.bin/systat/mbufs.c 1997/12/19 09:03:32 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: mbufs.c,v 1.3 1996/06/26 05:40:08 deraadt Exp $ */ +/* $OpenBSD: mbufs.c,v 1.4 1997/12/19 09:03:32 deraadt Exp $ */ /* $NetBSD: mbufs.c,v 1.2 1995/01/20 08:52:02 jtc Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: mbufs.c,v 1.3 1996/06/26 05:40:08 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: mbufs.c,v 1.4 1997/12/19 09:03:32 deraadt Exp $"; #endif /* not lint */ #include @@ -102,7 +102,7 @@ showmbufs() { register int i, j, max, index; - char buf[10]; + char buf[13]; if (mb == 0) return; @@ -121,7 +121,7 @@ mvwprintw(wnd, 1+j, 0, "%-10.10s", mtnames[index]); wmove(wnd, 1 + j, 10); if (max > 60) { - sprintf(buf, " %d", max); + snprintf(buf, sizeof buf, " %d", max); max = 60; while (max--) waddch(wnd, 'X');