]> granicus.if.org Git - nethack/commitdiff
#R733 (from <Someone>)
authornethack.allison <nethack.allison>
Mon, 1 Apr 2002 21:23:38 +0000 (21:23 +0000)
committernethack.allison <nethack.allison>
Mon, 1 Apr 2002 21:23:38 +0000 (21:23 +0000)
- fix a buffer overflow in the win32 graphical interface

win/win32/mhstatus.c

index 1647858c09f34ef9ba99eb82da97d461798f3285..4316bd1a7a49a9f5fbbd7f284a24fadc90e44524 100644 (file)
@@ -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");