Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/trek avoid buffer overrun. fix from openbsd.
details: https://anonhg.NetBSD.org/src/rev/85fc8006785b
branches: trunk
changeset: 538346:85fc8006785b
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Oct 18 14:12:14 2002 +0000
description:
avoid buffer overrun. fix from openbsd.
reported by Niels Heinen <niels.heinen%ubizen.com@localhost>
diffstat:
games/trek/getpar.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 32333d8c5655 -r 85fc8006785b games/trek/getpar.c
--- a/games/trek/getpar.c Fri Oct 18 13:45:05 2002 +0000
+++ b/games/trek/getpar.c Fri Oct 18 14:12:14 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: getpar.c,v 1.9 2002/02/26 02:37:28 wiz Exp $ */
+/* $NetBSD: getpar.c,v 1.10 2002/10/18 14:12:14 itojun Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getpar.c,v 1.9 2002/02/26 02:37:28 wiz Exp $");
+__RCSID("$NetBSD: getpar.c,v 1.10 2002/10/18 14:12:14 itojun Exp $");
#endif
#endif /* not lint */
@@ -145,7 +145,7 @@
if (f)
cgetc(0); /* throw out the newline */
scanf("%*[ \t;]");
- if ((c = scanf("%[^ \t;\n]", input)) < 0)
+ if ((c = scanf("%99[^ \t;\n]", input)) < 0)
exit(1);
if (c == 0)
continue;
Home |
Main Index |
Thread Index |
Old Index