Pseudo-C rendering misses the structure name if there is an access to offset 0x0 and there is no structure member there

Open
#6,495 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp

Research direction

Start with the attached executable and the reproduction steps at address 140002ed9, then inspect the pseudo-C rendering after creating the structure. Confirm that the first variable disappears when offset 0x0 has no structure member; done means the structure name and variable are both shown.

Written by the indexing model from the issue text.

Description

Effort: Low Impact: Low LanguageRep: Pseudo-C

Version and Platform (required):

  • Binary Ninja Version: 4.2.6455 (02c8da1e)
  • OS: Windows 10
  • OS Version: 22H2 OS build 19045.5371
  • CPU Architecture: x64

Bug Description:
When creating a structure, the variable is now "not showing in the UI" (see the image)

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. I have a small video clip showing how to reproduce the bug here: https://mega.nz/file/h7QSlYZC#cVSzuCzussiO6dZxW-27f7q5GidEVXniy_hr-ElIZO0
  2. Open the .EXE have attached
  3. Goto address 140002ed9
  4. Right click and pick "Create Structure"
  5. Click "Create"
  6. See that the first variable is gone.

Expected Behavior:
The variable to be shown

Screenshots/Video Recording:

Image

Binary:
Binary can be found here: https://mega.nz/file/ZzI2XDwT#r1C7MJIufDZoyAd-ePJbjaSIsiMLf5_zvIsDfYRT-a0
Password: malware
(I could not use your upload portal, it just say "unauthorized" when I tried to upload the file)

Additional Information:
Nothing I can think of right now

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.