Commit 54d7cb60 authored by Maxime Bellengé's avatar Maxime Bellengé Committed by Alexandre Julliard

Fix a string allocation.

parent 7e1d83ee
......@@ -277,7 +277,7 @@ static HRESULT WINAPI IAutoComplete_fnInit(
LONG len;
/* pwszRegKeyPath contains the key as well as the value, so we split */
key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lstrlenW(pwzsRegKeyPath)*sizeof(WCHAR));
key = (WCHAR*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwzsRegKeyPath)+1)*sizeof(WCHAR));
strcpyW(key, pwzsRegKeyPath);
value = strrchrW(key, '\\');
*value = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment