diff options
| author | KyleMiles <krm504@nyu.edu> | 2019-06-07 19:30:52 -0400 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2019-06-07 19:31:05 -0400 |
| commit | 0b82a65baf409d8325f9a6012750356088ab20e2 (patch) | |
| tree | 0da736ee3447a14d2e4ba0614284b58e76b92a03 /python | |
| parent | 95a4b66fd724cd0a4174ad2ecd8608a8f918aad5 (diff) | |
Fix 1360
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index ac82dbc3..f88c3974 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -188,7 +188,7 @@ class AnalysisCompletionEvent(object): def cancel(self): """ - The ``cancel`` method will cancel analysis for an :class:`AnalysisCompletionEvent`. + The ``cancel`` method will cancel analysis for an :class:`AnalysisCompletionEvent`. .. warning: This method should only be used when the system is being shut down and no further analysis should be done afterward. @@ -2764,7 +2764,7 @@ class BinaryView(object): def get_code_refs(self, addr, length=None): """ ``get_code_refs`` returns a list of ReferenceSource objects (xrefs or cross-references) that point to the provided virtual address. - This function returns both autoanalysis ("auto") and user-specified ("user") xrefs. + This function returns both autoanalysis ("auto") and user-specified ("user") xrefs. To add a user-specified reference, see :func:`~binaryninja.function.Function.add_user_code_ref`. :param int addr: virtual address to query for references @@ -3493,6 +3493,11 @@ class BinaryView(object): >>> s2.value 'WAVAUATUSH' """ + if not isinstance(addr, numbers.Integral): + raise AttributeError("Input address (" + str(addr) + ") is not a number.") + if addr < self.start or addr >= self.end: + return None + br = BinaryReader(self) br.seek(addr) length = 0 |
