Commit d9a06b23 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

advapi32: RegGetValueW() must return the required buffer size in bytes, not WCHARs.

parent c47c6483
...@@ -1504,7 +1504,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, ...@@ -1504,7 +1504,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
if (dwType == REG_EXPAND_SZ) if (dwType == REG_EXPAND_SZ)
{ {
cbData = ExpandEnvironmentStringsW(pvBuf, pvData, cbData = ExpandEnvironmentStringsW(pvBuf, pvData,
pcbData ? *pcbData : 0); pcbData ? *pcbData : 0) * sizeof(WCHAR);
dwType = REG_SZ; dwType = REG_SZ;
if(pvData && pcbData && cbData > *pcbData) if(pvData && pcbData && cbData > *pcbData)
ret = ERROR_MORE_DATA; ret = ERROR_MORE_DATA;
......
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