diff options
| author | Josh Ferrell <josh@vector35.com> | 2022-12-21 20:27:59 -0500 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2022-12-21 20:27:59 -0500 |
| commit | c63b8a9cdc019fcf81112423017127d3cdbed4d8 (patch) | |
| tree | a0fdb3728a00c20562c34b16112ab0e7498e59bc /python | |
| parent | 9a53dd8e1c301192708487d12e7f1e273820921d (diff) | |
Expose get_next_valid_offset in python api
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 287b4395..554e6b46 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -3600,6 +3600,16 @@ class BinaryView: length = core.BNGetModificationArray(self.handle, addr, data, length) return [ModificationStatus(a) for a in data[:length]] + def get_next_valid_offset(self, addr: int) -> int: + """ + ``get_next_valid_offset`` returns the next valid offset after ``addr``. + + :param int addr: a virtual address + :return: The minimum of the next valid offset in the BinaryView and the end address of the BinaryView + :rtype: int + """ + return core.BNGetNextValidOffset(self.handle, addr) + def is_valid_offset(self, addr: int) -> bool: """ ``is_valid_offset`` checks if a virtual address ``addr`` is valid . |
