diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2003-09-25 22:31:44 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2003-09-25 22:31:44 +0000 |
commit | 0cdb78eb81f90019f1445b90d4b54bc483424500 (patch) | |
tree | 499c8afdec2eb0a827ca1885c9cd28efa2231dde /games/adventure | |
parent | 8b89816853cd75b4cbe8385dad7f30617556a20e (diff) |
Fix a couple obvious off-by-one writes. No objections from anyone.
Diffstat (limited to 'games/adventure')
-rw-r--r-- | games/adventure/io.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/games/adventure/io.c b/games/adventure/io.c index e178285034c..a67b1b9f65e 100644 --- a/games/adventure/io.c +++ b/games/adventure/io.c @@ -1,4 +1,4 @@ -/* $OpenBSD: io.c,v 1.13 2003/06/03 03:01:37 millert Exp $ */ +/* $OpenBSD: io.c,v 1.14 2003/09/25 22:31:43 aaron Exp $ */ /* $NetBSD: io.c,v 1.3 1995/04/24 12:21:37 cgd Exp $ */ /*- @@ -39,7 +39,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$OpenBSD: io.c,v 1.13 2003/06/03 03:01:37 millert Exp $"; +static char rcsid[] = "$OpenBSD: io.c,v 1.14 2003/09/25 22:31:43 aaron Exp $"; #endif #endif /* not lint */ @@ -332,7 +332,7 @@ rdesc(sect) /* read description-format msgs */ ptext[oldloc].txtlen = maystart - seekstart; break; case 6: /* random messages */ - if (oldloc > RTXSIZ) + if (oldloc >= RTXSIZ) errx(1, "Too many random msgs"); rtext[oldloc].seekadr = seekhere; rtext[oldloc].txtlen = maystart - seekstart; @@ -343,7 +343,7 @@ rdesc(sect) /* read description-format msgs */ cval[clsses++] = oldloc; break; case 12:/* magic messages */ - if (oldloc > MAGSIZ) + if (oldloc >= MAGSIZ) errx(1, "Too many magic msgs"); mtext[oldloc].seekadr = seekhere; mtext[oldloc].txtlen = maystart - seekstart; |