You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In PE.relocate_image on line 5484 the sixth element of the Optional Header Data Directories is accessed but when parsing the file given below
the list of data directories is empty resulting in an IndexError.
Affected code:
ifself.OPTIONAL_HEADER.DATA_DIRECTORY[5].Size:
Exception:
Traceback (most recent call last):
File "fuzz_pefile.py", line 21, in test_one_input
p.relocate_image(0x40000)
File "pefile.py", line 5484, in relocate_image
if self.OPTIONAL_HEADER.DATA_DIRECTORY[5].Size:
IndexError: list index out of range
Activity
[-]Bugs: IndexError when relocating image[/-][+]Bug: IndexError when relocating image[/+]erocarrera commentedon May 13, 2021
Thanks for reporting!
Add test for issue #314
Check the issue 314 file rebases to an unchanged image (#648)