Hugh McMaster hugh.mcmaster@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.