From a07de2b816b2a6d7b25bffefd1239db80d85f6d7 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 1 Oct 2002 14:18:57 +0000 Subject: - 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 on bugtraq. - minor KNF. tested by simonb. --- rogue/message.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rogue/message.c') diff --git a/rogue/message.c b/rogue/message.c index 17af007c..20d4e3da 100644 --- a/rogue/message.c +++ b/rogue/message.c @@ -1,4 +1,4 @@ -/* $NetBSD: message.c,v 1.8 2000/07/10 10:19:27 itojun Exp $ */ +/* $NetBSD: message.c,v 1.9 2002/10/01 14:18:57 mrg 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.9 2002/10/01 14:18:57 mrg Exp $"); #endif #endif /* not lint */ @@ -64,7 +64,7 @@ __RCSID("$NetBSD: message.c,v 1.8 2000/07/10 10:19:27 itojun Exp $"); 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 -- cgit v1.2.3