Commit 738b6c00 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Use the correct section start when reading the COR header.

parent f512b3c0
......@@ -2286,7 +2286,7 @@ static BOOL get_cor_header( HANDLE file, const SECTION_IMAGE_INFORMATION *info,
{
if (va < sec[i].VirtualAddress) continue;
if (sec[i].Misc.VirtualSize && va - sec[i].VirtualAddress >= sec[i].Misc.VirtualSize) continue;
offset.QuadPart = sec->PointerToRawData + va - sec[i].VirtualAddress;
offset.QuadPart = sec[i].PointerToRawData + va - sec[i].VirtualAddress;
if (NtReadFile( file, 0, NULL, NULL, &io, cor, sizeof(*cor), &offset, NULL )) return FALSE;
return (io.Information == sizeof(*cor));
}
......
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