ImageBase might be 64-bit wide or 32-bit wide
From: André Zwing nerv@dawncrow.de
--- dlls/ntdll/loader.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 1a87f4d1f5e..db7303a1a1b 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2034,7 +2034,11 @@ static NTSTATUS perform_relocations( void *module, IMAGE_NT_HEADERS *nt, SIZE_T INT_PTR delta; ULONG protect_old[96], i;
- base = (char *)nt->OptionalHeader.ImageBase; + if (nt->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) + base = (char *)((const IMAGE_NT_HEADERS64 *)nt)->OptionalHeader.ImageBase; + else + base = (char *)((const IMAGE_NT_HEADERS32 *)nt)->OptionalHeader.ImageBase; + if (module == base) return STATUS_SUCCESS; /* nothing to do */
/* no relocations are performed on non page-aligned binaries */
This was fixed by a1830c03a50ad38ec3f857a2a8b88498d1bf5e54 and should no longer happen. If you still see this, please explain how to reproduce it.
On Wed Oct 18 19:12:44 2023 +0000, Alexandre Julliard wrote:
This was fixed by a1830c03a50ad38ec3f857a2a8b88498d1bf5e54 and should no longer happen. If you still see this, please explain how to reproduce it.
ok, likely a some patches we need for Hangover rn, sry
This merge request was closed by André Zwing.