Draft
Conversation
libclamav/others.c
Outdated
Check failure
Code scanning / CodeQL
Time-of-check time-of-use filesystem race condition High
libclamav/pe_icons.c
Outdated
| if (x + ksize > res->bright_x[j] && x < res->bright_x[j] + ksize && | ||
| y + ksize > res->bright_y[j] && y < res->bright_y[j] + ksize) | ||
| if (x + ksize > res->bright_x[j] && | ||
| x < res->bright_x[j] + ksize && |
Check failure
Code scanning / CodeQL
Multiplication result converted to larger type High
| @@ -523,22 +544,25 @@ | |||
| const char* str_end_what; | |||
| size_t cmp_len = what_len; | |||
|
|
|||
| if (begin == NULL || str_end <= sbegin) | |||
| if (begin == NULL || str_end <= sbegin) { | |||
Check failure
Code scanning / CodeQL
Redundant null check due to previous dereference High
Also add a couple of git checkouts to undue undesired changes to: - libclamav/nsis/bzlib.c - libclamav/nsis/infblock.c - libclamav/strlcat.c
…ents I applied the changes like this: ```bash clang-apply-replacements ./build/ ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I discovered that clang-tidy integration in cmake is pretty good. Linting in Rust with cargo-clippy is a positive experience. So out of curiosity, I added this integration and tested auto-applying changes to enforce branches around statements.
I set up this integration so you have to very intentionally enable it by adding a cmake option like this:
-D CLANG_TIDY=clang-tidy-16. This is because: