Vector35 / Vector35/binaryninja-api

TypeLibrary.load_from_file on missing file throws no exception and gives a misleading and inaccurate error in console

Open
#6,098 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: API Component: Type Libraries Effort: Trivial Impact: Low
Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Description

Version and Platform (required):

  • Binary Ninja Version: 4.2.6373

Bug Description:
TypeLibrary.load_from_file('wah') outputs nothing to the python console, and prints the following error in console:
[TypeLibrary.Deserialize] Type library had invalid header: 'wah'

Expected Behavior:
It should throw an OSError on missing file as python usually does, and the warning it prints in typelib code should be more accurate, as that warning is only printed if the file doesn't exist

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the TypeLibrary.load_from_file entry point and the typelib warning mentioned in the issue. Reproduce the missing-file case with 'wah', then verify that it raises OSError and that the warning accurately describes the missing file; add or run the relevant test if one exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api, reverse-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.