Commit 6018064d authored by Ralf Habacker's avatar Ralf Habacker Committed by Alexandre Julliard

dbghelp: Fix crash in module_find_cb on trying to parse non image files.

parent 61c49bd7
......@@ -490,7 +490,13 @@ static BOOL CALLBACK module_find_cb(PCWSTR buffer, PVOID user)
if ((mapping = MapViewOfFile(hMap, FILE_MAP_READ, 0, 0, 0)) != NULL)
{
IMAGE_NT_HEADERS* nth = RtlImageNtHeader(mapping);
if (!nth)
{
UnmapViewOfFile(mapping);
CloseHandle(hMap);
CloseHandle(hFile);
return FALSE;
}
matched++;
timestamp = nth->FileHeader.TimeDateStamp;
size = nth->OptionalHeader.SizeOfImage;
......
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