mirror of
https://github.com/dobin/SuperMega
synced 2026-06-02 17:27:10 +00:00
fix: adding invalid reloc entry
This commit is contained in:
@@ -154,6 +154,9 @@ class SuperPe():
|
||||
if hasattr(self.pe, 'DIRECTORY_ENTRY_BASERELOC'):
|
||||
for base_reloc in self.pe.DIRECTORY_ENTRY_BASERELOC:
|
||||
for entry in base_reloc.entries:
|
||||
if entry.rva == entry.base_rva:
|
||||
# offset = 0 means end of list. do not add.
|
||||
continue
|
||||
rva = entry.rva
|
||||
base_rva = entry.base_rva
|
||||
reloc_type = pefile.RELOCATION_TYPE[entry.type][0]
|
||||
|
||||
Reference in New Issue
Block a user