Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/games/trek Pull up revision 1.10 (requested by itojun i...



details:   https://anonhg.NetBSD.org/src/rev/9762b7b1ac02
branches:  netbsd-1-6
changeset: 529176:9762b7b1ac02
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Oct 21 01:55:53 2002 +0000

description:
Pull up revision 1.10 (requested by itojun in ticket #927):
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 abb903fb50f4 -r 9762b7b1ac02 games/trek/getpar.c
--- a/games/trek/getpar.c       Mon Oct 21 01:54:27 2002 +0000
+++ b/games/trek/getpar.c       Mon Oct 21 01:55:53 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.9.2.1 2002/10/21 01:55:53 lukem 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.9.2.1 2002/10/21 01:55:53 lukem 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