summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorn0p <0x90@n0p.cc>2013-10-26 20:21:07 +0200
committern0p <0x90@n0p.cc>2013-10-26 20:21:07 +0200
commit8846697ecda15bc814f99d24f7f5cbf0e06466d0 (patch)
treecd51bd47e96b6043a0bcaa736774c53584a3ad2d
parentd8f07a63f98e39ee9c24ce15662db59ec5b34332 (diff)
downloadSectionDoubleP-8846697ecda15bc814f99d24f7f5cbf0e06466d0.tar.gz
SectionDoubleP-8846697ecda15bc814f99d24f7f5cbf0e06466d0.zip
Check changed if space for a new section header can be added.HEADmaster
-rw-r--r--SectionDoubleP.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/SectionDoubleP.py b/SectionDoubleP.py
index f3c506f..93717cd 100644
--- a/SectionDoubleP.py
+++ b/SectionDoubleP.py
@@ -215,7 +215,7 @@ class SectionDoubleP:
(self.pe.FILE_HEADER.NumberOfSections)*0x28, 0x28))):
# Checking if more space can be added.
- if self.pe.OPTIONAL_HEADER.SizeOfHeaders < 0x1000:
+ if self.pe.OPTIONAL_HEADER.SizeOfHeaders < self.pe.sections[0].VirtualAddress:
self.__add_header_space()
print "Additional space to add a new section header was allocated."