[PATCH 5/5] ole32: Fix string buffer size.
Nikolay Sivov
nsivov at codeweavers.com
Mon Jan 27 00:24:20 CST 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/ole32/stg_prop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c
index 0f0f824a77..c5d2a42e1c 100644
--- a/dlls/ole32/stg_prop.c
+++ b/dlls/ole32/stg_prop.c
@@ -554,7 +554,7 @@ static HRESULT PropertyStorage_StringCopy(LPCSTR src, UINT srcCP, LPSTR *dst, UI
len = (lstrlenW((LPCWSTR)src) + 1) * sizeof(WCHAR);
else
len = strlen(src) + 1;
- *dst = CoTaskMemAlloc(len * sizeof(WCHAR));
+ *dst = CoTaskMemAlloc(len);
if (!*dst)
hr = STG_E_INSUFFICIENTMEMORY;
else
--
2.24.1
More information about the wine-devel
mailing list