binaryninja-api
binaryninja-api copied to clipboard
Python TypeLibrary.add_alternate_name(name) crash on null name
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:
- Load a Binary (in GUI or through the API)
- Use the following code:
name = None
tl = TypeLibrary.new(bv.arch, "some_type_lib")
typelib.add_alternate_name(name)
- Crash
Expected Behavior: I would expect it to raise an error -- something along the lines of "Expected a string, got TYPE" ?