mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
More LDR constants changes.
svn path=/trunk/; revision=12711
This commit is contained in:
parent
38c0b28279
commit
6a5aa2060e
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: rtl.c,v 1.20 2004/08/15 16:39:06 chorns Exp $
|
/* $Id$
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -28,9 +28,9 @@ RtlImageNtHeader (IN PVOID BaseAddress)
|
||||||
|
|
||||||
DosHeader = (PIMAGE_DOS_HEADER)BaseAddress;
|
DosHeader = (PIMAGE_DOS_HEADER)BaseAddress;
|
||||||
NTHeaders = (PIMAGE_NT_HEADERS)((char*)BaseAddress + DosHeader->e_lfanew);
|
NTHeaders = (PIMAGE_NT_HEADERS)((char*)BaseAddress + DosHeader->e_lfanew);
|
||||||
if ((DosHeader->e_magic != IMAGE_DOS_MAGIC)
|
if ((DosHeader->e_magic != IMAGE_DOS_SIGNATURE)
|
||||||
|| (DosHeader->e_lfanew == 0L)
|
|| (DosHeader->e_lfanew == 0L)
|
||||||
|| (*(PULONG) NTHeaders != IMAGE_PE_MAGIC))
|
|| (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE))
|
||||||
{
|
{
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,9 +125,9 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
|
||||||
*/
|
*/
|
||||||
DosHeader = (PIMAGE_DOS_HEADER) BlockBuffer;
|
DosHeader = (PIMAGE_DOS_HEADER) BlockBuffer;
|
||||||
NTHeaders = (PIMAGE_NT_HEADERS) (BlockBuffer + DosHeader->e_lfanew);
|
NTHeaders = (PIMAGE_NT_HEADERS) (BlockBuffer + DosHeader->e_lfanew);
|
||||||
if ((DosHeader->e_magic != IMAGE_DOS_MAGIC)
|
if ((DosHeader->e_magic != IMAGE_DOS_SIGNATURE)
|
||||||
|| (DosHeader->e_lfanew == 0L)
|
|| (DosHeader->e_lfanew == 0L)
|
||||||
|| (*(PULONG) NTHeaders != IMAGE_PE_MAGIC))
|
|| (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE))
|
||||||
{
|
{
|
||||||
DbgPrint("NTDLL format invalid\n");
|
DbgPrint("NTDLL format invalid\n");
|
||||||
ZwClose(FileHandle);
|
ZwClose(FileHandle);
|
||||||
|
|
Loading…
Reference in a new issue