diff options
| author | Eric Hennenfent <ecapstone@gmail.com> | 2018-10-30 17:56:18 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-30 17:56:18 -0500 |
| commit | f12ee0b91cf6d4d5a899ebe601bbb089f74f63c4 (patch) | |
| tree | 54f8e1af551432d80b379e3a20debae5044a44db /python/enum/__init__.py | |
| parent | cb0c0c57845396814239902b82c93d39ce9192a1 (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/enum/__init__.py')
0 files changed, 0 insertions, 0 deletions
