Commit ffc9df2d authored by Andrew Lewycky's avatar Andrew Lewycky Committed by Alexandre Julliard

do_relocations: process relocation blocks with a VirtualAddress of 0,

stop once SizeOfBlock == 0.
parent c3965bc5
......@@ -401,7 +401,7 @@ static int do_relocations( char *base, const IMAGE_NT_HEADERS *nt, const char *f
if ((nt->OptionalHeader.ImageBase & 0x80000000) && !((DWORD)base & 0x80000000))
ERR( "Forced to relocate system DLL (base > 2GB). This is not good.\n" );
for ( ; ((char *)rel < base + dir->VirtualAddress + dir->Size) && rel->VirtualAddress;
for ( ; ((char *)rel < base + dir->VirtualAddress + dir->Size) && rel->SizeOfBlock;
rel = (IMAGE_BASE_RELOCATION*)((char*)rel + rel->SizeOfBlock))
{
char *page = base + rel->VirtualAddress;
......
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