From 2395ea98bb61dcd3a468f615e7d5c8aa5d45be4d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 26 Jun 2011 16:43:02 +0200 Subject: [PATCH] ole32: Access the array entry, not the array (Coverity). --- dlls/ole32/stg_prop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index cc29c0e8cd..5eb0371e40 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -720,8 +720,8 @@ static HRESULT WINAPI IPropertyStorage_fnReadPropertyNames( hr = S_OK; rglpwstrName[i] = CoTaskMemAlloc((len + 1) * sizeof(WCHAR)); - if (rglpwstrName) - memcpy(rglpwstrName, name, (len + 1) * sizeof(WCHAR)); + if (rglpwstrName[i]) + memcpy(rglpwstrName[i], name, (len + 1) * sizeof(WCHAR)); else hr = STG_E_INSUFFICIENTMEMORY; }