From 8846697ecda15bc814f99d24f7f5cbf0e06466d0 Mon Sep 17 00:00:00 2001 From: n0p <0x90@n0p.cc> Date: Sat, 26 Oct 2013 20:21:07 +0200 Subject: Check changed if space for a new section header can be added. --- SectionDoubleP.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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." -- cgit v1.2.3