Skip to content

Commit

Permalink
Small bug fixes
Browse files Browse the repository at this point in the history
CONFIG: Disable `DIAPHORA_WORKAROUND_MAX_TINFO_T` by default.
BUG: For some reason I cannot reproduce, `extract_function_assembly_features()` might fail finding a specific address, workaround it.
  • Loading branch information
joxeankoret committed Aug 27, 2024
1 parent 232a272 commit 38414a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion diaphora_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@

#-------------------------------------------------------------------------------
# Workarounds for IDA bugs
DIAPHORA_WORKAROUND_MAX_TINFO_T = True
DIAPHORA_WORKAROUND_MAX_TINFO_T = False
3 changes: 3 additions & 0 deletions diaphora_ida.py
Original file line number Diff line number Diff line change
Expand Up @@ -2650,6 +2650,9 @@ def extract_function_assembly_features(self, assembly, f, image_base):
keys.remove(base)
keys.insert(0, base)
for key in keys:
if key not in assembly:
log(f"Key not in `assembly` list? Key {key} Assembly {assembly}")
continue
for line in assembly[key]:
assembly_addrs.append(line[0])
asm.append(line[1])
Expand Down

0 comments on commit 38414a3

Please sign in to comment.