summaryrefslogtreecommitdiffstats
path: root/trek
diff options
context:
space:
mode:
authoritojun <itojun@NetBSD.org>2002-10-18 14:12:14 +0000
committeritojun <itojun@NetBSD.org>2002-10-18 14:12:14 +0000
commit6a479db6bbb3f109b12190ea5a23ddc01a1c601e (patch)
tree5d0b8fec5d61181c7e20228a4fa0e1da41c89fec /trek
parenta07de2b816b2a6d7b25bffefd1239db80d85f6d7 (diff)
downloadbsdgames-darwin-6a479db6bbb3f109b12190ea5a23ddc01a1c601e.tar.gz
bsdgames-darwin-6a479db6bbb3f109b12190ea5a23ddc01a1c601e.tar.zst
bsdgames-darwin-6a479db6bbb3f109b12190ea5a23ddc01a1c601e.zip
avoid buffer overrun. fix from openbsd.
reported by Niels Heinen <niels.heinen@ubizen.com>
Diffstat (limited to 'trek')
-rw-r--r--trek/getpar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/trek/getpar.c b/trek/getpar.c
index 9a986268..d5f679aa 100644
--- a/trek/getpar.c
+++ b/trek/getpar.c
@@ -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 @@ const struct cvntab *getcodpar(s, tab)
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;