summaryrefslogtreecommitdiff
path: root/src/vm/peimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vm/peimage.cpp')
-rw-r--r--src/vm/peimage.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/vm/peimage.cpp b/src/vm/peimage.cpp
index 83989f0e4d..3536b08361 100644
--- a/src/vm/peimage.cpp
+++ b/src/vm/peimage.cpp
@@ -1029,9 +1029,7 @@ PTR_PEImageLayout PEImage::CreateLayoutFlat(BOOL bPermitWriteableSections)
PTR_PEImageLayout pFlatLayout = PEImageLayout::LoadFlat(GetFileHandle(),this);
- if (!bPermitWriteableSections
- && pFlatLayout->CheckNTHeaders()
- && pFlatLayout->HasWriteableSections())
+ if (!bPermitWriteableSections && pFlatLayout->HasWriteableSections())
{
pFlatLayout->Release();
@@ -1116,7 +1114,8 @@ void PEImage::Load()
#ifdef PLATFORM_UNIX
if (m_pLayouts[IMAGE_FLAT] != NULL
- && m_pLayouts[IMAGE_FLAT]->CheckILOnlyFormat()
+ && m_pLayouts[IMAGE_FLAT]->CheckFormat()
+ && m_pLayouts[IMAGE_FLAT]->IsILOnly()
&& !m_pLayouts[IMAGE_FLAT]->HasWriteableSections())
{
// IL-only images with writeable sections are mapped in general way,