Vector35 / Vector35/binaryninja-api
Renaming struct field behaves unexpectedly when fields share names
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.5.4412-dev
- OS: Windows
- OS Version: 11
- CPU Architecture: x64
Bug Description:
When a struct has two or more fields that share the same name, and multiple of them appear inside of the same function, and the user attempts to rename (via n shortcut) one of those fields that is not the first to appear in the struct, the wrong field will be renamed.
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
- Open a binary and define a struct with multiple fields that share the same name
- Navigate to a function where multiple fields of this struct will be referenced
- Select (by single-click highlighting) one of the field names, attempting to select a field that has a greater offset into the struct than at least one other
- Trigger the field rename modal via the
nshortcut - Rename the field and observe that the first field to share the original name was updated, and not the one that was selected
- Undo, and then select by double-clicking the field name, observing that attempts to rename the field work as expected
Expected Behavior:
The field that was selected is renamed, not another field
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 using a struct with duplicate field names and a function that references multiple fields, following the listed single-click and double-click cases. Trace the field selected by the rename shortcut and verify that renaming changes the selected field rather than the first field with the same name; confirm both selection methods and undo behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- reverse-engineering
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100