Module: wine Branch: master Commit: db4586d274fb88029d8805a358e40dea43dd4662 URL: http://source.winehq.org/git/wine.git/?a=commit;h=db4586d274fb88029d8805a358...
Author: Mikołaj Zalewski mikolaj@zalewski.pl Date: Wed May 30 10:06:34 2007 +0200
kernel32: Clear the extra memory in LocalReAlloc16(h, bigger_size, LMEM_ZEROINIT).
---
dlls/kernel32/local16.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/kernel32/local16.c b/dlls/kernel32/local16.c index eb8df76..76b2a6d 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; }