[PATCH] windows.globalization: Fix an incorrect sizeof (Coverity).

Sven Baars sbaars at codeweavers.com
Sat Apr 24 06:24:03 CDT 2021


Signed-off-by: Sven Baars <sbaars at codeweavers.com>
---
 dlls/windows.globalization/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/windows.globalization/main.c b/dlls/windows.globalization/main.c
index 1c41e77d41b..b124f79c644 100644
--- a/dlls/windows.globalization/main.c
+++ b/dlls/windows.globalization/main.c
@@ -183,7 +183,7 @@ static HRESULT STDMETHODCALLTYPE hstring_vector_GetMany(IVectorView_HSTRING *ifa
 
     TRACE("iface %p, start_index %#x, items %p, count %p.\n", iface, start_index, items, count);
 
-    memset(items, 0, items_size * sizeof(HSTRING *));
+    memset(items, 0, items_size * sizeof(*items));
 
     for (i = start_index; i < impl->count && i < start_index + items_size; ++i)
         if (FAILED(hr = WindowsDuplicateString(impl->values[i], items + i - start_index)))
-- 
2.30.0.335.ge6362826a0




More information about the wine-devel mailing list