From 47f8dbcb3669de7a04420b80737682ec0e69cbd6 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 7 Apr 2015 12:01:17 +0300 Subject: [PATCH] shell32: Fix allocation size (Valgrind). --- dlls/shell32/shellitem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c index b1cae7e53c4..f8b083f141c 100644 --- a/dlls/shell32/shellitem.c +++ b/dlls/shell32/shellitem.c @@ -1314,7 +1314,7 @@ HRESULT WINAPI SHCreateShellItemArrayFromIDLists(UINT cidl, if(cidl == 0) return E_INVALIDARG; - array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellItem*)); + array = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cidl*sizeof(IShellItem*)); if(!array) return E_OUTOFMEMORY;