shell32: Pass correct buffer length to RegQueryValueExW().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
703e82094b
commit
0bfb97dcba
|
@ -3209,8 +3209,8 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix,
|
|||
HRESULT hr;
|
||||
WCHAR shellFolderPath[MAX_PATH], userShellFolderPath[MAX_PATH];
|
||||
LPCWSTR pShellFolderPath, pUserShellFolderPath;
|
||||
DWORD dwType, dwPathLen = MAX_PATH;
|
||||
HKEY userShellFolderKey, shellFolderKey;
|
||||
DWORD dwType, dwPathLen;
|
||||
|
||||
TRACE("%p,%s,%s,%p\n",rootKey, debugstr_w(userPrefix), debugstr_w(value),
|
||||
path);
|
||||
|
@ -3245,6 +3245,7 @@ static HRESULT _SHGetUserShellFolderPath(HKEY rootKey, LPCWSTR userPrefix,
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
dwPathLen = MAX_PATH * sizeof(WCHAR);
|
||||
if (!RegQueryValueExW(userShellFolderKey, value, NULL, &dwType,
|
||||
(LPBYTE)path, &dwPathLen) && (dwType == REG_EXPAND_SZ || dwType == REG_SZ))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue