Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/usr.bin/systat Pull up revision 1.21 (requested by jwise):
details: https://anonhg.NetBSD.org/src/rev/a7d92b98e844
branches: netbsd-1-4
changeset: 469961:a7d92b98e844
user: he <he%NetBSD.org@localhost>
date: Mon Dec 20 23:54:16 1999 +0000
description:
Pull up revision 1.21 (requested by jwise):
Guard against buffer overflow.
diffstat:
usr.bin/systat/main.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r bebd824eab4a -r a7d92b98e844 usr.bin/systat/main.c
--- a/usr.bin/systat/main.c Mon Dec 20 23:46:46 1999 +0000
+++ b/usr.bin/systat/main.c Mon Dec 20 23:54:16 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.15.2.1 1999/09/26 13:36:43 he Exp $ */
+/* $NetBSD: main.c,v 1.15.2.2 1999/12/20 23:54:16 he Exp $ */
/*-
* Copyright (c) 1980, 1992, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: main.c,v 1.15.2.1 1999/09/26 13:36:43 he Exp $");
+__RCSID("$NetBSD: main.c,v 1.15.2.2 1999/12/20 23:54:16 he Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -100,6 +100,7 @@
egid = getegid();
(void)setegid(getgid());
+
while ((ch = getopt(argc, argv, "M:N:w:")) != -1)
switch(ch) {
case 'M':
@@ -331,7 +332,7 @@
if (wnd) {
getyx(stdscr, oy, ox);
- (void) vsprintf(buf, fmt, ap);
+ (void) vsnprintf(buf, sizeof(buf), fmt, ap);
clrtoeol();
standout();
mvaddstr(CMDLINE, 0, buf);
Home |
Main Index |
Thread Index |
Old Index