Allow overriding how a pointer to a string literal is displayed

Open
#6,884 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp

Research direction

Reproduce the issue with the provided binary by opening HLIL at 0x283334, then compare how the pointer is displayed in MLIL, HLIL, and pseudo C. Start by locating the existing “Display as” context-menu handling for constant values and string literals. Done means a constant pointer recognized as a string literal offers the menu and can be displayed as unsigned hex or another selected format.

Written by the indexing model from the issue text.

Description

Component: UI Effort: Low Impact: Low

Version and Platform (required):

  • Binary Ninja Version: 5.1.7500-dev (1da2316a)
  • OS: macOS 15.5
  • CPU Architecture: arm64

Bug Description:
From time to time Binary Ninja will see a constant integer that it can interpret as a pointer into a string literal. When it does this, it displays the string literal inline in MLIL, HLIL, and pseudo C views. This isn't great (see https://github.com/Vector35/binaryninja-api/issues/6883 about doing this less).

When Binary Ninja makes an incorrect assumption about the type the user should be able to override it. Sadly the "Display as" context menu is not offered for constant pointers to string literals so there's no way to override it.

Steps To Reproduce:

  1. Open the provided binary.
  2. Go to 0x283334 in HLIL.
  3. Right-click on the bogus string literal and try to find some way to have it not be displayed as a string literal.

Expected Behavior:
The "Display as" context menu to let me choose to display it as unsigned hex or whatever.

Binary:
eager dragon paints eagerly

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

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.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.