Vector35 / Vector35/binaryninja-api

Selection range not correct while using arrow keys in linearview

Open
#6,726 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Version and Platform (required):

  • Binary Ninja Version: 5.0.7291-test Ultimate (ac5099fd)
  • OS: Debian
  • OS Version: trixie
  • CPU Architecture: x64

Bug Description:
When multiple instructions are selected in Linear Disassembly view using keyboard and then they are replaced with NOPs, one extra instruction gets replaced. When the same is done using mouse, the command works as intended.

Steps To Reproduce:

  1. Open the attached database. There is nothing special about it; you could copy the hex bytes into a new binary view and the issue will manifest just the same.
  2. Select the first three instructions (address 00 through 0a inclusive) by clicking address 00 with the mouse, holding Shift and pressing Down two times. You will see: Image
  3. Run Patch > Convert to NOP (via mouse, command palette, etc). One more instruction at address 11 gets gobbled: Image
  4. Question whether you have "lost it" or it is the tool which is wrong

Expected Behavior:
Instructions get NOPped out iff they appear selected on screen.

Binary:
bug.zip

Additional Information:
I am sure this could be minimized further but it doesn't seem necessary to do so.

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

Reproduce the issue in the Linear Disassembly view using the supplied bug.zip or equivalent bytes: select instructions with Shift+Down, then run Patch > Convert to NOP. Compare the keyboard selection range with the mouse-selected range; done means Convert to NOP changes only the instructions visibly selected on screen.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.