Skip to content

Commit

Permalink
Fix PE import parsing when OriginalFirstThunk is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
bdcht committed Oct 13, 2014
1 parent 08d09af commit 60bf12c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion amoco/system/pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,10 @@ def __functions(self):
except ValueError:
logger.warning('invalid dll name RVA in ImportTable')
try:
data = self.getdata(e.ImportLookupTableRVA)
if e.ImportLookupTableRVA != 0:
data = self.getdata(e.ImportLookupTableRVA)
else:
data = self.getdata(e.ImportAddressTableRVA)
except ValueError:
logger.warning('invalid ImportLookupTable RVA')
else:
Expand Down

0 comments on commit 60bf12c

Please sign in to comment.