More LDR constants changes.

svn path=/trunk/; revision=12711
This commit is contained in:
Alex Ionescu 2005-01-01 22:57:06 +00:00
parent 38c0b28279
commit 6a5aa2060e
2 changed files with 5 additions and 5 deletions

View file

@ -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
* PROJECT: ReactOS kernel
@ -28,9 +28,9 @@ RtlImageNtHeader (IN PVOID BaseAddress)
DosHeader = (PIMAGE_DOS_HEADER)BaseAddress;
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)
|| (*(PULONG) NTHeaders != IMAGE_PE_MAGIC))
|| (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE))
{
return(NULL);
}

View file

@ -125,9 +125,9 @@ NTSTATUS LdrpMapSystemDll(HANDLE ProcessHandle,
*/
DosHeader = (PIMAGE_DOS_HEADER) BlockBuffer;
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)
|| (*(PULONG) NTHeaders != IMAGE_PE_MAGIC))
|| (*(PULONG) NTHeaders != IMAGE_NT_SIGNATURE))
{
DbgPrint("NTDLL format invalid\n");
ZwClose(FileHandle);