Vector35 / Vector35/binaryninja-api
FormInputField::Integer doesn't handle 0n prefix
Nobody has claimed this yet.
- 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.1.5246-dev
- OS: macOS
- OS Version: 14
- CPU Architecture: M1
Bug Description:
The FormInputField APi for Integer fields doesn't respect the 0n1234 convention binja generally uses for numbers, nor does it use hex-by-default conventions either. We should make it match the integer parsing behavior seen elsewhere in the app.
Steps To Reproduce:
- Run this python:
fi = IntegerField('int')
get_form_input([fi], 'a')
fi.result
- Try to type 0n1234
- Observe error box
- Type 1234
- Observe result is decimal 1234 and not 0x1234
Expected Behavior:
I expected integer form inputs to match the rest of the product
Additional Information:
Likely in mainwindow's interaction handler
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the mainwindow interaction handler mentioned in the report and trace how IntegerField input is parsed. Reproduce the issue with the supplied Python snippet, then verify that 0n1234 is accepted and that an unprefixed 1234 follows the product's hex-by-default convention.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- devtools, reverse-engineering
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100