Nikolay Sivov : shell32: Fix allocation size (Valgrind).

Alexandre Julliard julliard at wine.codeweavers.com
Tue Apr 7 10:11:28 CDT 2015


Module: wine
Branch: master
Commit: 47f8dbcb3669de7a04420b80737682ec0e69cbd6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=47f8dbcb3669de7a04420b80737682ec0e69cbd6

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Tue Apr  7 12:01:17 2015 +0300

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 b1cae7e..f8b083f 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;
 




More information about the wine-cvs mailing list