From ba5e12ae8332246d64d0f3b2827ff3d5e7b6c760 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Mon, 7 Mar 2016 22:04:25 +0300 Subject: [PATCH] notepad: Make sure to use large enough buffer when composing window title (Coverity). Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- programs/notepad/dialog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/notepad/dialog.c b/programs/notepad/dialog.c index 1ea2ef90c33..94301b82bd3 100644 --- a/programs/notepad/dialog.c +++ b/programs/notepad/dialog.c @@ -101,9 +101,9 @@ VOID ShowLastError(void) */ void UpdateWindowCaption(void) { - WCHAR szCaption[MAX_STRING_LEN]; - WCHAR szNotepad[MAX_STRING_LEN]; 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') lstrcpyW(szCaption, Globals.szFileTitle); -- 2.11.4.GIT