binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Python TypeLibrary.add_alternate_name(name) crash on null name

Open Zerotistic opened this issue 1 year ago • 0 comments

Version and Platform (required):

  • Binary Ninja Version: 4.2.5802-dev
  • OS: Linux (arch) / MacOS
  • OS Version: 6.6.12-hardened1-1-hardened / Sonoma 14.6
  • CPU Architecture: x86_64 / M1

Bug Description: In the Python API, when calling TypeLibrary.add_alternate_name(name) with name as null value, Binary Ninja will crash

Steps To Reproduce:

  1. Load a Binary (in GUI or through the API)
  2. Use the following code:
name = None
tl = TypeLibrary.new(bv.arch, "some_type_lib")
typelib.add_alternate_name(name)
  1. Crash

Expected Behavior: I would expect it to raise an error -- something along the lines of "Expected a string, got TYPE" ?

Zerotistic avatar Aug 02 '24 04:08 Zerotistic