diff options
| author | Brian Potchik <brian@vector35.com> | 2018-01-15 18:30:08 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2018-01-15 18:30:08 -0500 |
| commit | cd8903be01bee8f38833bbabca2b7ae31880abb7 (patch) | |
| tree | 871dce6e0aaf2d6fc16d448f4162a249bbcea0a3 /python/binaryview.py | |
| parent | 5c6b13a5576ccbf9c64ba51079d1a3625661cb50 (diff) | |
Add platform check and access correct autodefined field.
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 6eb59db1..fae98c14 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -2095,6 +2095,8 @@ class BinaryView(object): """ if plat is None: plat = self.platform + if plat is None: + return None func = core.BNGetAnalysisFunction(self.handle, plat.handle, addr) if func is None: return None @@ -3398,7 +3400,7 @@ class BinaryView(object): return None result = Section(section.name, section.type, section.start, section.length, section.linkedSection, section.infoSection, section.infoData, section.align, section.entrySize, section.semantics, - section_list.autoDefined) + section.autoDefined) core.BNFreeSection(section) return result |
