diff options
| author | Xusheng <xusheng@vector35.com> | 2022-12-23 17:43:18 +0800 |
|---|---|---|
| committer | Xusheng <xusheng@vector35.com> | 2022-12-23 17:46:21 +0800 |
| commit | 73368f24d167eedee98e0c7269759558fa98bb36 (patch) | |
| tree | 5107039f86e40b20b5cf49e760919ac1b8286f9c /python/binaryview.py | |
| parent | 4cf96b9c87f3203944c49207bf48611c92e79071 (diff) | |
Fix import_library_type and import_library_object passing wrong type of arguments into the core. Fix https://github.com/Vector35/binaryninja-api/issues/3755
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 1af47236..e3ab5898 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -6990,8 +6990,12 @@ class BinaryView: :rtype: Type """ _name = _types.QualifiedName(name) - _lib = ctypes.POINTER(core.BNTypeLibrary)() - _lib.contents = None if lib is None else lib.handle + _lib = ctypes.POINTER(ctypes.POINTER(core.BNTypeLibrary))() + if lib is not None: + _lib.contents = lib.handle + else: + _lib.contents = ctypes.POINTER(core.BNTypeLibrary)() + handle = core.BNBinaryViewImportTypeLibraryType( self.handle, _lib, _name._to_core_struct() ) @@ -7017,8 +7021,12 @@ class BinaryView: :rtype: Type """ _name = _types.QualifiedName(name) - _lib = ctypes.POINTER(core.BNTypeLibrary)() - _lib.contents = None if lib is None else lib.handle + _lib = ctypes.POINTER(ctypes.POINTER(core.BNTypeLibrary))() + if lib is not None: + _lib.contents = lib.handle + else: + _lib.contents = ctypes.POINTER(core.BNTypeLibrary)() + handle = core.BNBinaryViewImportTypeLibraryObject( self.handle, _lib, _name._to_core_struct() ) |
