Re: [PATCH 2/2] uninstaller: Allocate enough memory to null-terminate the command string
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
3135
Age (days ago)
3135
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard