Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unreferenced strings if they start with '_' #1941

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

wxsBSD
Copy link
Collaborator

@wxsBSD wxsBSD commented Aug 1, 2023

As briefly discussed in #1937, this change will make it so that any string identifier that starts with '_' can be unreferenced. Any anonymous strings must still be referenced.

While testing this out I realized that an unreferenced string still had the STRING_FLAG_FIXED_OFFSET set, which meant any unreferenced string would have a fixed_offset of YR_UNDEFINED. To deal with this when we are reducing the rule we unset STRING_FLAG_FIXED_OFFSET if the string is unreferenced.

As briefly discussed in VirusTotal#1937, this change will make it so that any string
identifier that starts with '_' can be unreferenced. Any anonymous strings
must still be referenced.

While testing this out I realized that an unreferenced string still had the
STRING_FLAG_FIXED_OFFSET set, which meant any unreferenced string would have a
fixed_offset of YR_UNDEFINED. To deal with this when we are reducing the rule
we unset STRING_FLAG_FIXED_OFFSET if the string is unreferenced.
@plusvic plusvic merged commit ba07831 into VirusTotal:master Aug 23, 2023
10 checks passed
@wxsBSD wxsBSD deleted the unreferenced_strings branch August 23, 2023 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants