From 60ae03fed8aee9bc88c6d04023bcd3c922ec273e Mon Sep 17 00:00:00 2001 From: Xusheng Date: Tue, 4 Feb 2025 17:51:09 +0800 Subject: Do not call callbacks on IL instruction when the instruction index is invalid. Fix https://github.com/Vector35/binaryninja-api/issues/6320 --- python/plugin.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'python') 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)) -- cgit v1.3.1