Date: Fri, 14 Sep 2001 15:03:17 -0400 (EDT) From: "Andrew R. Reiter" <arr@watson.org> To: Ruslan Ermilov <ru@FreeBSD.ORG> Cc: freebsd-audit@FreeBSD.ORG Subject: Re: dungeon master patch Message-ID: <Pine.NEB.3.96L.1010914150236.20183A-200000@fledge.watson.org> In-Reply-To: <20010914123454.B82568@sunbay.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
new patch -- only adds %39's
Andrew
*-------------.................................................
| Andrew R. Reiter
| arr@fledge.watson.org
| "It requires a very unusual mind
| to undertake the analysis of the obvious" -- A.N. Whitehead
[-- Attachment #2 --]
--- dm.c.orig Fri Sep 14 14:00:12 2001
+++ dm.c Fri Sep 14 14:03:07 2001
@@ -142,20 +142,20 @@
while (fgets(lbuf, sizeof(lbuf), cfp))
switch(*lbuf) {
case 'b': /* badtty */
- if (sscanf(lbuf, "%s%s", f1, f2) != 2 ||
+ if (sscanf(lbuf, "%39s%39s", 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, "%39s%39s%39s%39s%39s",
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 ||
- strcasecmp(f1, "time"))
+ if (sscanf(lbuf, "%39s%39s%39s%39s",
+ f1, f2, f3, f4) != 4 || strcasecmp(f1, "time"))
break;
c_day(f2, f3, f4);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1010914150236.20183A-200000>
