ida: insn: look for numbers in displ, not phrase

This commit is contained in:
Willi Ballenthin
2022-04-06 15:41:17 -06:00
parent c36bde0f2d
commit 6b810a1f72
+6 -1
View File
@@ -221,7 +221,12 @@ def extract_insn_offset_features(f, bb, insn):
if (
insn.itype == idaapi.NN_lea
and i == 1
and op.type == idaapi.o_phrase
# o_displ is used for both:
# [eax+1]
# [eax+ebx+2]
and op.type == idaapi.o_displ
# but the SIB is only present for [eax+ebx+2]
# which we don't want
and not capa.features.extractors.ida.helpers.has_sib(op)
):
# for pattern like: