binaryninja-api
binaryninja-api copied to clipboard
Small string explicitly defined as a string does not show up in strings view.
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:
- Compile a binary with a small string (
echo 'int main(void) { char* item = "-v"; return 0; }' | clang -x c -o bugbin -
- Open the binary in binaryninja
- Define the string as a string
- 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.
Related: #1334
When someone:
- Hits 'a' or 'Shift+a' to create a string (these go through
DefineUserDataVariable
/DefineAutoDataVariable
) or uses the equivalent APIs - 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.