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/tantan-23/src/tantan.cc Examining data/tantan-23/src/tantan_repeat_finder.cc Examining data/tantan-23/src/mcf_fasta_sequence.cc Examining data/tantan-23/src/mcf_alphabet.cc Examining data/tantan-23/src/mcf_tantan_options.cc Examining data/tantan-23/src/mcf_util.cc Examining data/tantan-23/src/mcf_score_matrix.cc Examining data/tantan-23/src/tantan_app.cc Examining data/tantan-23/src/LambdaCalculator.cc FINAL RESULTS: data/tantan-23/src/mcf_fasta_sequence.cc:49:47: [3] (random) setstate: 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. if (firstChar != '>' && firstChar != '@') s.setstate(std::ios::failbit); data/tantan-23/src/mcf_score_matrix.cc:136:11: [3] (random) setstate: 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. s.setstate(std::ios::failbit); data/tantan-23/src/mcf_tantan_options.cc:33:10: [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. return getopt(argc, argv, optstring); data/tantan-23/src/mcf_tantan_options.cc:40:7: [3] (random) setstate: 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. s.setstate(std::ios::failbit); data/tantan-23/src/LambdaCalculator.cc:18:3: [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. char buffer[32]; data/tantan-23/src/LambdaCalculator.cc:19:3: [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(buffer, "%g", x); data/tantan-23/src/mcf_util.cc:11:7: [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). ifs.open(fileName.c_str()); data/tantan-23/src/mcf_util.cc:18:7: [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). ofs.open(fileName.c_str()); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 2212 in approximately 0.07 seconds (33028 lines/second) Physical Source Lines of Code (SLOC) = 1753 Hits@level = [0] 0 [1] 0 [2] 4 [3] 4 [4] 0 [5] 0 Hits@level+ = [0+] 8 [1+] 8 [2+] 8 [3+] 4 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.56361 [1+] 4.56361 [2+] 4.56361 [3+] 2.2818 [4+] 0 [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.