Fix a buffer overrun in autocomplete.
This commit is contained in:
parent
40f09314e4
commit
75d8be030a
@ -562,7 +562,7 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
|||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, This->txtbackup);
|
HeapFree(GetProcessHeap(), 0, This->txtbackup);
|
||||||
This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(),
|
This->txtbackup = (WCHAR*) HeapAlloc(GetProcessHeap(),
|
||||||
HEAP_ZERO_MEMORY, lstrlenW(hwndText)*sizeof(WCHAR));
|
HEAP_ZERO_MEMORY, (lstrlenW(hwndText)+1)*sizeof(WCHAR));
|
||||||
lstrcpyW(This->txtbackup, hwndText);
|
lstrcpyW(This->txtbackup, hwndText);
|
||||||
|
|
||||||
/* Returns if there is no text to search and we doesn't want to display all the entries */
|
/* Returns if there is no text to search and we doesn't want to display all the entries */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user