Commit 3d546775 authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

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=49590Signed-off-by: 's avatarPaul Gofman <pgofman@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 24e09ac5
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment