Flawfinder version 1.26, (C) 2001-2004 David A. Wheeler. Number of dangerous functions in C/C++ ruleset: 158 Examining multiple-bugs.c multiple-bugs.c:41: [5] (buffer) gets: Does not check for buffer overflows. Use fgets() instead. multiple-bugs.c:25: [4] (buffer) sprintf: Does not check for buffer overflows. Use snprintf or vsnprintf. multiple-bugs.c:42: [4] (format) sprintf: Potential format string problem. Make format string constant. multiple-bugs.c:44: [4] (format) syslog: If syslog's format strings can be influenced by an attacker, they can be exploited. Use a constant format string for syslog. multiple-bugs.c:46: [4] (shell) system: This causes a new program to execute and is difficult to use safely. try using a library call that implements the same functionality if available. multiple-bugs.c:25: [3] (buffer) getenv: Environment variables are untrustable input if they can beit returns untrustable input if the environment can beset by an attacker. It can have any content and length, and the same variable can be set more than once. Check environment variables carefully before using them. multiple-bugs.c:18: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. multiple-bugs.c:23: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. multiple-bugs.c:26: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?. multiple-bugs.c:33: [2] (buffer) char: Statically-sized arrays can be overflowed. Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. Hits = 10 Lines analyzed = 49 in 0.52 seconds (2114 lines/second) Physical Source Lines of Code (SLOC) = 35 Hits@level = [0] 0 [1] 0 [2] 4 [3] 1 [4] 4 [5] 1 Hits@level+ = [0+] 10 [1+] 10 [2+] 10 [3+] 6 [4+] 5 [5+] 1 Hits/KSLOC@level+ = [0+] 285.714 [1+] 285.714 [2+] 285.714 [3+] 171.429 [4+] 142.857 [5+] 28.5714 Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code!