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/filtlong-0.2.0/src/args.h Examining data/filtlong-0.2.0/src/arguments.cpp Examining data/filtlong-0.2.0/src/arguments.h Examining data/filtlong-0.2.0/src/bloom_filter.h Examining data/filtlong-0.2.0/src/kmers.cpp Examining data/filtlong-0.2.0/src/kmers.h Examining data/filtlong-0.2.0/src/kseq.h Examining data/filtlong-0.2.0/src/main.cpp Examining data/filtlong-0.2.0/src/misc.cpp Examining data/filtlong-0.2.0/src/misc.h Examining data/filtlong-0.2.0/src/read.cpp Examining data/filtlong-0.2.0/src/read.h FINAL RESULTS: data/filtlong-0.2.0/src/bloom_filter.h:534:10: [3] (random) srand: 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. srand(static_cast<unsigned int>(random_seed_)); data/filtlong-0.2.0/src/bloom_filter.h:34:23: [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 const unsigned char bit_mask[bits_per_char] = { data/filtlong-0.2.0/src/kseq.h:129:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->s + str->l, ks->buf + ks->begin, i - ks->begin); \ data/filtlong-0.2.0/src/main.cpp:104:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reads.push_back(read); data/filtlong-0.2.0/src/main.cpp:112:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_dict[read->m_name] = read; data/filtlong-0.2.0/src/main.cpp:138:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads) { data/filtlong-0.2.0/src/main.cpp:140:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). reads2.push_back(read); data/filtlong-0.2.0/src/main.cpp:148:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) { data/filtlong-0.2.0/src/main.cpp:156:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) data/filtlong-0.2.0/src/main.cpp:172:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) { data/filtlong-0.2.0/src/main.cpp:181:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) { data/filtlong-0.2.0/src/main.cpp:201:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) { data/filtlong-0.2.0/src/main.cpp:222:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) { data/filtlong-0.2.0/src/main.cpp:251:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads2) { data/filtlong-0.2.0/src/main.cpp:315:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (auto read : reads) data/filtlong-0.2.0/src/main.cpp:316:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). delete read; ANALYSIS SUMMARY: Hits = 16 Lines analyzed = 4698 in approximately 0.14 seconds (34548 lines/second) Physical Source Lines of Code (SLOC) = 3442 Hits@level = [0] 0 [1] 13 [2] 2 [3] 1 [4] 0 [5] 0 Hits@level+ = [0+] 16 [1+] 16 [2+] 3 [3+] 1 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 4.64846 [1+] 4.64846 [2+] 0.871586 [3+] 0.290529 [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.