Commit ba5e12ae authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

notepad: Make sure to use large enough buffer when composing window title (Coverity).

parent 39958094
...@@ -101,9 +101,9 @@ VOID ShowLastError(void) ...@@ -101,9 +101,9 @@ VOID ShowLastError(void)
*/ */
void UpdateWindowCaption(void) void UpdateWindowCaption(void)
{ {
WCHAR szCaption[MAX_STRING_LEN];
WCHAR szNotepad[MAX_STRING_LEN];
static const WCHAR hyphenW[] = { ' ','-',' ',0 }; static const WCHAR hyphenW[] = { ' ','-',' ',0 };
WCHAR szNotepad[64];
WCHAR szCaption[ARRAY_SIZE(Globals.szFileTitle) + ARRAY_SIZE(hyphenW) + ARRAY_SIZE(szNotepad)];
if (Globals.szFileTitle[0] != '\0') if (Globals.szFileTitle[0] != '\0')
lstrcpyW(szCaption, Globals.szFileTitle); lstrcpyW(szCaption, Globals.szFileTitle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment