From b4bb1c931cf0a258b734dcf2df0658f948c047e0 Mon Sep 17 00:00:00 2001 From: Ge van Geldorp Date: Thu, 16 Dec 2004 14:23:16 +0000 Subject: [PATCH] Allocate correct amount of memory. --- dlls/ole32/ifs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/ifs.c b/dlls/ole32/ifs.c index eaa6a4c37f5..bb80208d952 100644 --- a/dlls/ole32/ifs.c +++ b/dlls/ole32/ifs.c @@ -77,8 +77,8 @@ static int SetSpyedBlockTableLength ( int NewLength ) { LPVOID *NewSpyedBlocks; - if (!Malloc32.SpyedBlocks) NewSpyedBlocks = LocalAlloc(GMEM_ZEROINIT, NewLength); - else NewSpyedBlocks = LocalReAlloc(Malloc32.SpyedBlocks, NewLength, GMEM_ZEROINIT); + if (!Malloc32.SpyedBlocks) NewSpyedBlocks = LocalAlloc(GMEM_ZEROINIT, NewLength * sizeof(PVOID)); + else NewSpyedBlocks = LocalReAlloc(Malloc32.SpyedBlocks, NewLength * sizeof(PVOID), GMEM_ZEROINIT); if (NewSpyedBlocks) { Malloc32.SpyedBlocks = NewSpyedBlocks; Malloc32.SpyedBlockTableLength = NewLength;