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/bpm-tools-0.3/bpm.c FINAL RESULTS: data/bpm-tools-0.3/bpm.c:303:2: [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(format, bpm); data/bpm-tools-0.3/bpm.c:70:8: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. mid = drand48() * len; data/bpm-tools-0.3/bpm.c:207:7: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt(argc, argv, "vf:g:e:m:x:h"); data/bpm-tools-0.3/bpm.c:217:12: [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? (CWE-362). fdiff = fopen(optarg, "w"); data/bpm-tools-0.3/bpm.c:225:11: [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? (CWE-362). fnrg = fopen(optarg, "w"); ANALYSIS SUMMARY: Hits = 5 Lines analyzed = 319 in approximately 0.02 seconds (18813 lines/second) Physical Source Lines of Code (SLOC) = 209 Hits@level = [0] 7 [1] 0 [2] 2 [3] 2 [4] 1 [5] 0 Hits@level+ = [0+] 12 [1+] 5 [2+] 5 [3+] 3 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 57.4163 [1+] 23.9234 [2+] 23.9234 [3+] 14.3541 [4+] 4.78469 [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.