summaryrefslogtreecommitdiff
path: root/python/examples/instruction_iterator.py
diff options
context:
space:
mode:
authorEric Hennenfent <ecapstone@gmail.com>2018-10-30 17:56:18 -0500
committerGitHub <noreply@github.com>2018-10-30 17:56:18 -0500
commitf12ee0b91cf6d4d5a899ebe601bbb089f74f63c4 (patch)
tree54f8e1af551432d80b379e3a20debae5044a44db /python/examples/instruction_iterator.py
parentcb0c0c57845396814239902b82c93d39ce9192a1 (diff)
Type check SSA variables in __eq__
Instantly bail if we try to compare a SSAVariable to something that isn't an SSA Variable. Prevents the following issue: ``` >>> bv.get_functions_at(here)[0].medium_level_il.ssa_form[96].src[0].src <ssa <var uint64_t rax_2> version 13> >>> type(bv.get_functions_at(here)[0].medium_level_il.ssa_form[96].src[0].src) <class 'binaryninja.mediumlevelil.SSAVariable'> >>> bv.get_functions_at(here)[0].medium_level_il.ssa_form[96].src[0].src == 'rax_2' Traceback (most recent call last): File "<console>", line 1, in <module> File "/Applications/Binary Ninja.app/Contents/MacOS/plugins/../../Resources/python/binaryninja/mediumlevelil.py", line 48, in __eq__ (other.var, other.version) AttributeError: 'str' object has no attribute 'var' ```
Diffstat (limited to 'python/examples/instruction_iterator.py')
0 files changed, 0 insertions, 0 deletions