Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/oss-preserve-1.1/ossctl.c FINAL RESULTS: data/oss-preserve-1.1/ossctl.c:91:7: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf (line_format, 'D', i, 0); data/oss-preserve-1.1/ossctl.c:96:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf (line_format, data/oss-preserve-1.1/ossctl.c:101:7: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf (line_format, 'X', 0, 0); data/oss-preserve-1.1/ossctl.c:153:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char name [32]; data/oss-preserve-1.1/ossctl.c:155:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (name, "/dev/mixer"); data/oss-preserve-1.1/ossctl.c:157:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (name, "/dev/mixer%u", i); data/oss-preserve-1.1/ossctl.c:169:17: [2] (misc) open: 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? (CWE-362). int fd = (open (filename, O_RDONLY, 0)); data/oss-preserve-1.1/ossctl.c:253:8: [2] (misc) open: 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? (CWE-362). fd = (open (filename, O_WRONLY, 0)); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 273 in approximately 0.02 seconds (16944 lines/second) Physical Source Lines of Code (SLOC) = 230 Hits@level = [0] 2 [1] 0 [2] 5 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 10 [1+] 8 [2+] 8 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 43.4783 [1+] 34.7826 [2+] 34.7826 [3+] 13.0435 [4+] 13.0435 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.