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

fix: correct indentation issues #2133

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

secDre4mer
Copy link
Contributor

There were two minor issues in the YR_DEBUG_FPRINTF statements:

  • yr_process_get_next_memory_block had a debug statement starting with +, which YR_DEBUG_FPRINTF interpreted as a function starting, but since there was no corresponding }, this caused indentation to permanently increase by 1
  • test_pass had a closing debug statement at its end, which decreased indentation (and possibly caused the test to fail if indentation was already 0), but no opening debug statement, causing indentation to effectively decrease by 1

This can be reproduced with ./configure --with-debug-verbose=2.

@secDre4mer
Copy link
Contributor Author

On a different topic: Indentation can also permanently increase by 1 if a SIGBUS or SIGSEGV is caught (since in that case the "closing statement" which decreases indentation is never executed). That's a minor issue, though, and not directly related to the fixes addressed in this PR.

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.

1 participant