summaryrefslogtreecommitdiff
path: root/python/plugin.py
diff options
context:
space:
mode:
authorXusheng <xusheng@vector35.com>2025-02-04 17:51:09 +0800
committerXusheng <xusheng@vector35.com>2025-02-04 17:51:09 +0800
commit60ae03fed8aee9bc88c6d04023bcd3c922ec273e (patch)
treed7b669eb9937e1ee2b653c6a3681d41bca2c0931 /python/plugin.py
parent3687549928785060162280286972377703024608 (diff)
Do not call callbacks on IL instruction when the instruction index is invalid. Fix https://github.com/Vector35/binaryninja-api/issues/6320
Diffstat (limited to 'python/plugin.py')
-rw-r--r--python/plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/plugin.py b/python/plugin.py
index e5441f7f..85fbb0aa 100644
--- a/python/plugin.py
+++ b/python/plugin.py
@@ -303,6 +303,8 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
@staticmethod
def _low_level_il_instruction_is_valid(view, func, instr, is_valid):
try:
+ if instr == 0xffffffffffffffff:
+ return False
if is_valid is None:
return True
file_metadata = filemetadata.FileMetadata(handle=core.BNGetFileForView(view))
@@ -333,6 +335,8 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
@staticmethod
def _medium_level_il_instruction_is_valid(view, func, instr, is_valid):
try:
+ if instr == 0xffffffffffffffff:
+ return False
if is_valid is None:
return True
file_metadata = filemetadata.FileMetadata(handle=core.BNGetFileForView(view))
@@ -363,6 +367,8 @@ class PluginCommand(metaclass=_PluginCommandMetaClass):
@staticmethod
def _high_level_il_instruction_is_valid(view, func, instr, is_valid):
try:
+ if instr == 0xffffffffffffffff:
+ return False
if is_valid is None:
return True
file_metadata = filemetadata.FileMetadata(handle=core.BNGetFileForView(view))