From 12f3bc0af72ab213a1db1b674dbd711dbb385f20 Mon Sep 17 00:00:00 2001 From: sunjammerx Date: Tue, 3 Sep 2002 23:23:15 +0000 Subject: [PATCH] Fixed a buffer overrun that was causing makensisw.exe to crash - I *think* this is the cause of the elusive crash that's been around for about a week now. git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@897 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Makensisw/utils.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Contrib/Makensisw/utils.cpp b/Contrib/Makensisw/utils.cpp index a388a2be..916e6118 100644 --- a/Contrib/Makensisw/utils.cpp +++ b/Contrib/Makensisw/utils.cpp @@ -32,7 +32,12 @@ void SetTitle(HWND hwnd,char *substr) { } void SetBranding(HWND hwnd) { - char title[16]; + // buffer overrun occured here, consider changing to a _snprintf style + // function (Rainwater this is your call, I don't want to introduce use of + // a new string function into your code)... if the buffer is overwritten + // it trashes the function post code. For now I've just increased the size + // of the title buffer -- Sunjammer 04 September 2002. + char title[128]; wsprintf(title,"MakeNSISW %s",NSISW_VERSION); SetDlgItemText(hwnd, IDC_VERSION, title); }