From 62a8ad0e874643e8d11bc1f44e86945fd4049355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 4 Jul 2004 06:56:41 +0000 Subject: [PATCH] Mike McCormack - Fix a buffer overrun in autocomplete. svn path=/trunk/; revision=9991 --- reactos/lib/shell32/autocomplete.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/lib/shell32/autocomplete.c b/reactos/lib/shell32/autocomplete.c index 50460c4bec9..ebc2bfcc304 100644 --- a/reactos/lib/shell32/autocomplete.c +++ b/reactos/lib/shell32/autocomplete.c @@ -562,7 +562,7 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, HeapFree(GetProcessHeap(), 0, This->txtbackup); This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, lstrlenW(hwndText)*sizeof(WCHAR)); + HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR)); lstrcpyW(This->txtbackup, hwndText); /* Returns if there is no text to search and we doesn't want to display all the entries */