[GH-ISSUE #348] Cppcheck static code analysis #244

Closed
opened 2026-05-05 05:24:34 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @temporaryaccount on GitHub (Mar 3, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/348

Firejail being a security product written in C needs a very careful approach when programming. Errors are unavoidable, I'd like to know whether it is being routinely checked by static analyzers like Cppcheck or the one in CLANG. FYI, Cppcheck reports some (maybe) minor issues like "%u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'." or "scanf without field width limits can crash with huge input data. Add a field width specifier to fix this problem: %s => %20s", etc.

Thank you for this program!

Originally created by @temporaryaccount on GitHub (Mar 3, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/348 Firejail being a security product written in C needs a very careful approach when programming. Errors are unavoidable, I'd like to know whether it is being routinely checked by static analyzers like Cppcheck or the one in CLANG. FYI, Cppcheck reports some (maybe) minor issues like "%u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'." or "scanf without field width limits can crash with huge input data. Add a field width specifier to fix this problem: %s => %20s", etc. Thank you for this program!
Author
Owner

@netblue30 commented on GitHub (Mar 4, 2016):

It is already included into the build (make cppcheck in the main project directoy).

<!-- gh-comment-id:192396336 --> @netblue30 commented on GitHub (Mar 4, 2016): It is already included into the build (make cppcheck in the main project directoy).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#244
No description provided.