From: Iain Patterson Date: Mon, 27 Jan 2014 19:05:46 +0000 (+0000) Subject: Enough with the small buffers already. X-Git-Tag: v2.22~30 X-Git-Url: http://git.iain.cx/?p=nssm.git;a=commitdiff_plain;h=e19b4a0eedf34a09e999394a2863cb2ef47cdc14 Enough with the small buffers already. Sledgehammer, meet nut. --- diff --git a/event.cpp b/event.cpp index 0bf8960..b44482c 100644 --- a/event.cpp +++ b/event.cpp @@ -81,7 +81,7 @@ int popup_message(HWND owner, unsigned int type, unsigned long id, ...) { return MessageBox(0, _T("The message which was supposed to go here is missing!"), NSSM, MB_OK | MB_ICONEXCLAMATION); } - TCHAR blurb[1024]; + TCHAR blurb[NSSM_ERROR_BUFSIZE]; va_start(arg, id); if (_vsntprintf_s(blurb, _countof(blurb), _TRUNCATE, format, arg) < 0) { va_end(arg);