[2/2] advapi32: RegGetValueW() must return the required buffer size in bytes, not WCHARs.
Francois Gouget
fgouget at codeweavers.com
Fri Jan 11 02:52:05 CST 2008
---
This is independent from the previous patch but will not apply cleanly
if [1/2] is not applied first because the contexts overlap...
dlls/advapi32/registry.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 8849513..d9ea99f 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -1504,7 +1504,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
if (dwType == REG_EXPAND_SZ)
{
cbData = ExpandEnvironmentStringsW(pvBuf, pvData,
- pcbData ? *pcbData : 0);
+ pcbData ? *pcbData : 0) * sizeof(WCHAR);
dwType = REG_SZ;
if(pvData && pcbData && cbData > *pcbData)
ret = ERROR_MORE_DATA;
--
1.5.3.7
More information about the wine-patches
mailing list