From df39d363b229683f0b89bb712e2f9d362aee901a Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Mon, 1 Apr 2002 21:23:38 +0000 Subject: [PATCH] #R733 (from ) - fix a buffer overflow in the win32 graphical interface --- win/win32/mhstatus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win/win32/mhstatus.c b/win/win32/mhstatus.c index 1647858c0..4316bd1a7 100644 --- a/win/win32/mhstatus.c +++ b/win/win32/mhstatus.c @@ -7,11 +7,11 @@ #include "mhfont.h" #define NHSW_LINES 2 -#define MAXWINDOWTEXT 80 +#define MAXWINDOWTEXT BUFSZ typedef struct mswin_nethack_status_window { int index; - char window_text[NHSW_LINES][MAXWINDOWTEXT]; + char window_text[NHSW_LINES][MAXWINDOWTEXT+1]; } NHStatusWindow, *PNHStatusWindow; static TCHAR szStatusWindowClass[] = TEXT("MSNHStatusWndClass");