From 9a97191ff5966c1621dc49091263d439a5b50fa8 Mon Sep 17 00:00:00 2001 From: Rusty Wagner Date: Fri, 15 Jul 2016 22:28:11 -0400 Subject: Cap opcode display length to max instruction length in Python API --- python/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index fb5bfa3c..390c4efd 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -3359,6 +3359,10 @@ class Architecture(object): self.__dict__["flags_written_by_flag_write_type"][write_type] = flag_names else: _init_plugins() + + if self.__class__.opcode_display_length > self.__class__.max_instr_length: + self.__class__.opcode_display_length = self.__class__.max_instr_length + self._cb = core.BNCustomArchitecture() self._cb.context = 0 self._cb.init = self._cb.init.__class__(self._init) -- cgit v1.3.1