#include <reactos/exeformat.h>
-#ifndef MAXULONG
-#define MAXULONG ((ULONG)(~1))
-#endif
-
static ULONG SectionCharacteristicsToProtect[16] =
{
PAGE_NOACCESS, /* 0 = NONE */
return Addend1 <= (MAXULONG_PTR - Addend2);
}
-#ifndef MAXLONGLONG
-#define MAXLONGLONG ((LONGLONG)((~((ULONGLONG)0)) >> 1))
-#endif
-
static __inline BOOLEAN Intsafe_CanAddLong64(IN LONG64 Addend1, IN LONG64 Addend2)
{
return Addend1 <= (MAXLONGLONG - Addend2);
+
+
+
+
+
+
if(pioh64OptHeader->ImageBase > MAXULONG_PTR)
DIE(("ImageBase exceeds the address space\n"));
- ImageSectionObject->ImageBase = pioh64OptHeader->ImageBase;
+ ImageSectionObject->ImageBase = (ULONG_PTR)pioh64OptHeader->ImageBase;
}
if(RTL_CONTAINS_FIELD(pioh64OptHeader, cbOptHeaderSize, SizeOfImage))