notepad: Make sure to use large enough buffer when composing window title (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
39958094b9
commit
ba5e12ae83
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue