From db4586d274fb88029d8805a358e40dea43dd4662 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Miko=C5=82aj=20Zalewski?= Date: Wed, 30 May 2007 10:06:34 +0200 Subject: [PATCH] kernel32: Clear the extra memory in LocalReAlloc16(h, bigger_size, LMEM_ZEROINIT). --- dlls/kernel32/local16.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/kernel32/local16.c b/dlls/kernel32/local16.c index eb8df76dff3..76b2a6d7f95 100644 --- a/dlls/kernel32/local16.c +++ b/dlls/kernel32/local16.c @@ -1330,6 +1330,9 @@ HLOCAL16 WINAPI LocalReAlloc16( HLOCAL16 handle, WORD size, UINT16 flags ) { TRACE("size increase, making new free block\n"); LOCAL_GrowArenaUpward(ds, arena, nextarena - arena); + if (flags & LMEM_ZEROINIT) + memset((char *)pArena + oldsize, 0, size - oldsize); + TRACE("returning %04x\n", handle ); return handle; } -- 2.11.4.GIT