summaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2002-02-25 00:18:49 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2002-02-25 00:18:49 +0000
commit34f938a9992f312c2f6619e383dae0a2b6899275 (patch)
treec7aa5bb83784f00677fbba084437731521f79a34 /games
parent6773b069b5f5d40b9fb348862aa4f52b358b4b40 (diff)
fix buffer overflow in scanf; found by pjanzen
Diffstat (limited to 'games')
-rw-r--r--games/trek/getpar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/trek/getpar.c b/games/trek/getpar.c
index 991b7ce415c..afb9727dd00 100644
--- a/games/trek/getpar.c
+++ b/games/trek/getpar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getpar.c,v 1.7 2002/02/25 00:15:19 pvalchev Exp $ */
+/* $OpenBSD: getpar.c,v 1.8 2002/02/25 00:18:48 pvalchev Exp $ */
/* $NetBSD: getpar.c,v 1.4 1995/04/24 12:25:57 cgd Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: getpar.c,v 1.7 2002/02/25 00:15:19 pvalchev Exp $";
+static char rcsid[] = "$OpenBSD: getpar.c,v 1.8 2002/02/25 00:18:48 pvalchev Exp $";
#endif
#endif /* not lint */
@@ -146,7 +146,7 @@ getcodpar(s, tab)
if (f)
getchar(); /* 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;