pefile: handle case where no name is exported

closes #684
This commit is contained in:
Willi Ballenthin
2021-08-09 20:28:25 -06:00
committed by GitHub
parent dd7a48a00c
commit 6d0a777de6

View File

@@ -32,6 +32,8 @@ def extract_file_export_names(pe, file_path):
if hasattr(pe, "DIRECTORY_ENTRY_EXPORT"):
for export in pe.DIRECTORY_ENTRY_EXPORT.symbols:
if not export.name:
continue
try:
name = export.name.partition(b"\x00")[0].decode("ascii")
except UnicodeDecodeError: