kernel32: Zero initialize module data in fetch_module().
Otherwise unitialized name string pointers may be freed in CreateToolhelp32Snapshot(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49590 Signed-off-by: Paul Gofman <pgofman@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
24e09ac582
commit
3d54677586
|
@ -108,9 +108,9 @@ static BOOL fetch_module( DWORD process, DWORD flags, LDR_DATA_TABLE_ENTRY **ldr
|
|||
while (curr != head)
|
||||
{
|
||||
if (!*num)
|
||||
*ldr_mod = HeapAlloc( GetProcessHeap(), 0, sizeof(LDR_DATA_TABLE_ENTRY) );
|
||||
*ldr_mod = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(LDR_DATA_TABLE_ENTRY) );
|
||||
else
|
||||
*ldr_mod = HeapReAlloc( GetProcessHeap(), 0, *ldr_mod,
|
||||
*ldr_mod = HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, *ldr_mod,
|
||||
(*num + 1) * sizeof(LDR_DATA_TABLE_ENTRY) );
|
||||
if (!*ldr_mod) break;
|
||||
if (!ReadProcessMemory( hProcess,
|
||||
|
|
Loading…
Reference in New Issue