mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Ignore the "magic flag" in RtlImageDirectoryEntryToData.
svn path=/trunk/; revision=16905
This commit is contained in:
@@ -27,8 +27,11 @@ RtlImageNtHeader (IN PVOID BaseAddress)
|
||||
|
||||
if (DosHeader && DosHeader->e_magic != IMAGE_DOS_SIGNATURE)
|
||||
{
|
||||
extern ULONG KdDebuggerEnabled;
|
||||
DPRINT1("DosHeader->e_magic %x\n", DosHeader->e_magic);
|
||||
DPRINT1("NtHeader 0x%p\n", ((ULONG_PTR)BaseAddress + DosHeader->e_lfanew));
|
||||
if (KdDebuggerEnabled)
|
||||
DbgBreakPoint();
|
||||
}
|
||||
|
||||
if (DosHeader && DosHeader->e_magic == IMAGE_DOS_SIGNATURE)
|
||||
@@ -57,6 +60,10 @@ RtlImageDirectoryEntryToData (
|
||||
PIMAGE_NT_HEADERS NtHeader;
|
||||
ULONG Va;
|
||||
|
||||
/* Magic flag for non-mapped images. */
|
||||
if ((ULONG_PTR)BaseAddress & 1)
|
||||
BaseAddress = (PVOID)((ULONG_PTR)BaseAddress & ~1);
|
||||
|
||||
NtHeader = RtlImageNtHeader (BaseAddress);
|
||||
if (NtHeader == NULL)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user