summaryrefslogtreecommitdiff
path: root/games/dm
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-14 09:51:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-14 09:51:38 +0000
commit39fc8dc6e08faa4f43c53ae7583495a39361f008 (patch)
treeb60e126d8e54b8ea8c5d44123e1a7184001ee7e3 /games/dm
parent6b9a220c3ce8db4d71854fe88ab579e56259926d (diff)
buf oflows
Diffstat (limited to 'games/dm')
-rw-r--r--games/dm/dm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/games/dm/dm.c b/games/dm/dm.c
index a1fe0b2dde8..261e20fdcaf 100644
--- a/games/dm/dm.c
+++ b/games/dm/dm.c
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)dm.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: dm.c,v 1.5 1996/12/21 21:11:53 tholo Exp $";
+static char rcsid[] = "$OpenBSD: dm.c,v 1.6 1998/05/14 09:51:37 deraadt Exp $";
#endif
#endif /* not lint */
@@ -129,19 +129,19 @@ read_config()
while (fgets(lbuf, sizeof(lbuf), cfp))
switch(*lbuf) {
case 'b': /* badtty */
- if (sscanf(lbuf, "%s%s", f1, f2) != 2 ||
+ if (sscanf(lbuf, "%40s40%s", f1, f2) != 2 ||
strcasecmp(f1, "badtty"))
break;
c_tty(f2);
break;
case 'g': /* game */
- if (sscanf(lbuf, "%s%s%s%s%s",
+ if (sscanf(lbuf, "%40s%40s%40s%40s%40s",
f1, f2, f3, f4, f5) != 5 || strcasecmp(f1, "game"))
break;
c_game(f2, f3, f4, f5);
break;
case 't': /* time */
- if (sscanf(lbuf, "%s%s%s%s", f1, f2, f3, f4) != 4 ||
+ if (sscanf(lbuf, "%40s%40s%40s%40s", f1, f2, f3, f4) != 4 ||
strcasecmp(f1, "time"))
break;
c_day(f2, f3, f4);