Fix a buffer overrun in autocomplete.

This commit is contained in:
Mike McCormack 2004-07-04 00:11:07 +00:00 committed by Alexandre Julliard
parent 40f09314e4
commit 75d8be030a
1 changed files with 1 additions and 1 deletions

View File

@ -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 */