diff options
| author | Brian Potchik <brian@vector35.com> | 2018-01-15 18:30:08 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-03-23 17:10:06 -0400 |
| commit | d788badbbd0744a623da4fd97aaa539d2726a00b (patch) | |
| tree | fe623a6bae2960cd91076b5803b2f313c11d6ad6 /python/binaryview.py | |
| parent | b8fa482c429b0af57571f27874535f138bcbd6f8 (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 |
