Vector35 / Vector35/binaryninja-api
Changing the type of a member in a structure at the start of an array in linear view changes the type of the array, not the member
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: 3.6.4719-dev, dec72a07
- OS: macos
- OS Version: 14.2
- CPU Architecture: arm64
Bug Description:
In the screenshot below I want to set MajorFunction to one of IRP_MJ enumeration in linear view but without changing the type of MajorFunction to enum IRP_MJ.
Here is how it is look like before I try to set MajorFunction to enumeration:
This is what I got when I click on 0x0 in line uint8_t MajorFunction = 0x0, press M and select IRP_MJ_CREATE.
I noticed that when I click on 0x1 in line uint8_t MajorFunction = 0x1 and press M select enum dialog does not open up. Probably this is why it corrupts the stucture. What happening there is probably when I do this in uint8_t MajorFunction = 0x0, actually it is the start offset of the structure. So even if I believe I'm doing enum select operation in line uint8_t MajorFunction = 0x0, it is actually doing that for the start offset of the structure, and creates a enumeration variable there.
Expected Behavior:
I expect BN to allow me select enumeration in structure members in linear view
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 by reproducing the issue in Binary Ninja's linear view with a structure at the start of an array, then use the described M key and enum selection flow on MajorFunction. Done means selecting an enum for the structure member changes that member without changing the array type or structure itself.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100