shell32: Initialize memory to zero in IShellItemArray constructor.

David Hedberg david.hedberg at gmail.com
Thu Jul 29 13:21:17 CDT 2010


This is needed as we might, if passed an invalid riid,
hit ::Release before we get to initialize array or item_count.
---
 dlls/shell32/shellitem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/shell32/shellitem.c b/dlls/shell32/shellitem.c
index 5b01262..a7b2f29 100644
--- a/dlls/shell32/shellitem.c
+++ b/dlls/shell32/shellitem.c
@@ -765,7 +765,7 @@ static HRESULT WINAPI IShellItemArray_Constructor(IUnknown *pUnkOuter, REFIID ri
     if(pUnkOuter)
         return CLASS_E_NOAGGREGATION;
 
-    This = HeapAlloc(GetProcessHeap(), 0, sizeof(IShellItemArrayImpl));
+    This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IShellItemArrayImpl));
     if(!This)
         return E_OUTOFMEMORY;
 
-- 
1.7.2




More information about the wine-patches mailing list