Commit b7fa637c authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed import directory limits (spotted by Jan Kratochvil).

parent 6b25723c
...@@ -673,9 +673,8 @@ static LPVOID map_image( HANDLE hmapping, int fd, char *base, DWORD total_size, ...@@ -673,9 +673,8 @@ static LPVOID map_image( HANDLE hmapping, int fd, char *base, DWORD total_size,
if (imports && imports->VirtualAddress >= sec->VirtualAddress && if (imports && imports->VirtualAddress >= sec->VirtualAddress &&
imports->VirtualAddress < sec->VirtualAddress + size) imports->VirtualAddress < sec->VirtualAddress + size)
{ {
DWORD base = imports->VirtualAddress & ~page_mask; UINT_PTR base = imports->VirtualAddress & ~page_mask;
DWORD end = imports->VirtualAddress + ROUND_SIZE( imports->VirtualAddress, UINT_PTR end = base + ROUND_SIZE( imports->VirtualAddress, imports->Size );
imports->Size );
if (end > sec->VirtualAddress + size) end = sec->VirtualAddress + size; if (end > sec->VirtualAddress + size) end = sec->VirtualAddress + size;
if (end > base) VIRTUAL_mmap( shared_fd, ptr + base, end - base, if (end > base) VIRTUAL_mmap( shared_fd, ptr + base, end - base,
pos, 0, PROT_READ|PROT_WRITE|PROT_EXEC, pos, 0, PROT_READ|PROT_WRITE|PROT_EXEC,
......
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