MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / perform_is_valid_offset

Method perform_is_valid_offset

python/binaryview.py:4052–4066  ·  view source on GitHub ↗

``perform_is_valid_offset`` implements a check if a virtual address ``addr`` is valid. .. note:: This method **may** be overridden by custom BinaryViews. Use :py:func:`add_auto_segment` to provide \ data without overriding this method. .. warning:: This method **must not** be called direc

(self, addr: int)

Source from the content-addressed store, hash-verified

4050 return ModificationStatus.Original
4051
4052 def perform_is_valid_offset(self, addr: int) -> bool:
4053 """
4054 ``perform_is_valid_offset`` implements a check if a virtual address ``addr`` is valid.
4055
4056 .. note:: This method **may** be overridden by custom BinaryViews. Use :py:func:`add_auto_segment` to provide \
4057 data without overriding this method.
4058
4059 .. warning:: This method **must not** be called directly.
4060
4061 :param int addr: a virtual address to be checked
4062 :return: true if the virtual address is valid, false if the virtual address is invalid or error
4063 :rtype: bool
4064 """
4065 data = self.read(addr, 1)
4066 return (data is not None) and (len(data) == 1)
4067
4068 def perform_is_offset_readable(self, offset: int) -> bool:
4069 """

Callers 1

_is_valid_offsetMethod · 0.95

Calls 1

readMethod · 0.95

Tested by

no test coverage detected