Source-Changes-HG archive

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

[src/netbsd-1-6]: src/games/rogue Pull up revision 1.9 (requested by mrg in t...



details:   https://anonhg.NetBSD.org/src/rev/5a695424a2d7
branches:  netbsd-1-6
changeset: 529123:5a695424a2d7
user:      lukem <lukem%NetBSD.org@localhost>
date:      Tue Oct 01 23:45:18 2002 +0000

description:
Pull up revision 1.9 (requested by mrg in ticket #892):
- use correctly bounded strings when reloading a saved game.  in particular,
do not let the save game file "string length" exceed the amount of space
supplied.  as noted by <stanojr%iserver.sk@localhost> on bugtraq.
- minor KNF.
tested by simonb.

diffstat:

 games/rogue/message.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 1ef4298c1902 -r 5a695424a2d7 games/rogue/message.c
--- a/games/rogue/message.c     Mon Sep 30 23:29:54 2002 +0000
+++ b/games/rogue/message.c     Tue Oct 01 23:45:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: message.c,v 1.8 2000/07/10 10:19:27 itojun Exp $       */
+/*     $NetBSD: message.c,v 1.8.2.1 2002/10/01 23:45:18 lukem Exp $    */
 
 /*
  * Copyright (c) 1988, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)message.c  8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: message.c,v 1.8 2000/07/10 10:19:27 itojun Exp $");
+__RCSID("$NetBSD: message.c,v 1.8.2.1 2002/10/01 23:45:18 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -64,7 +64,7 @@
 char msgs[NMESSAGES][DCOLS] = {"", "", "", "", ""};
 short msg_col = 0, imsg = -1;
 boolean msg_cleared = 1, rmsg = 0;
-char hunger_str[8] = "";
+char hunger_str[HUNGER_STR_LEN] = "";
 const char *more = "-more-";
 
 void



Home | Main Index | Thread Index | Old Index