15 May
2017
15 May
'17
9:17 a.m.
Hugh McMaster <hugh.mcmaster(a)outlook.com> writes:
@@ -245,7 +245,7 @@ static int FetchFromRootKey(HKEY root) type == REG_DWORD && value == 1) { static const WCHAR fmtW[] = {'m','s','i','e','x','e','c',' ','/','x','%','s',0}; - command = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(fmtW) + lstrlenW(subKeyName)) * sizeof(WCHAR)); + command = HeapAlloc(GetProcessHeap(), 0, (lstrlenW(fmtW) + sizeOfSubKeyName + 1) * sizeof(WCHAR));
The %s in the format gets replaced, so the existing code is fine. -- Alexandre Julliard julliard(a)winehq.org