binaryninja-api icon indicating copy to clipboard operation
binaryninja-api copied to clipboard

Small string explicitly defined as a string does not show up in strings view.

Open 0cyn opened this issue 2 years ago • 2 comments

Version and Platform (required):

  • Binary Ninja Version: 3.1.3642

Bug Description: Strings decided to be "small" are not shown in the strings view even when explicitly defined as strings

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

  1. Compile a binary with a small string ( echo 'int main(void) { char* item = "-v"; return 0; }' | clang -x c -o bugbin -
  2. Open the binary in binaryninja
  3. Define the string as a string
  4. Open Strings View and witness it not there

Expected Behavior: Strings defined as strings should appear in the strings view

Additional Information: Strings are arbitrarily limited from autodetection elsewhere by length, and presumably, strings view's source of strings is as well, since otherwise every ascii valid instruction would appear there.

0cyn avatar Aug 23 '22 02:08 0cyn

Related: #1334

psifertex avatar Aug 29 '22 18:08 psifertex

When someone:

  1. Hits 'a' or 'Shift+a' to create a string (these go through DefineUserDataVariable/DefineAutoDataVariable) or uses the equivalent APIs
  2. Any time a data variable is created, we look to see if the underlying data is a string

...we need to create a string reference. We also need to do the opposite of these things to remove them from the list.

fuzyll avatar Sep 06 '22 18:09 fuzyll