kernel32: Clear the extra memory in LocalReAlloc16(h, bigger_size, LMEM_ZEROINIT).

oldstable
Mikołaj Zalewski 2007-05-30 10:06:34 +02:00 committed by Alexandre Julliard
parent 9a295e7f87
commit db4586d274
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}