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/flexbar-3.5.0/src/Flexbar.cpp Examining data/flexbar-3.5.0/src/Flexbar.h Examining data/flexbar-3.5.0/src/FlexbarIO.h Examining data/flexbar-3.5.0/src/FlexbarTypes.h Examining data/flexbar-3.5.0/src/LoadAdapters.h Examining data/flexbar-3.5.0/src/LoadFasta.h Examining data/flexbar-3.5.0/src/Options.h Examining data/flexbar-3.5.0/src/PairedAlign.h Examining data/flexbar-3.5.0/src/PairedInput.h Examining data/flexbar-3.5.0/src/PairedOutput.h Examining data/flexbar-3.5.0/src/QualTrimming.h Examining data/flexbar-3.5.0/src/SeqAlign.h Examining data/flexbar-3.5.0/src/SeqAlignAlgo.h Examining data/flexbar-3.5.0/src/SeqAlignPair.h Examining data/flexbar-3.5.0/src/SeqInput.h Examining data/flexbar-3.5.0/src/SeqOutput.h Examining data/flexbar-3.5.0/src/SeqOutputFiles.h FINAL RESULTS: data/flexbar-3.5.0/src/FlexbarIO.h:26: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). strm.open(path.c_str(), ios::in | ios::binary); data/flexbar-3.5.0/src/FlexbarIO.h:37: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). strm.open(path.c_str(), ios::out | ios::binary); data/flexbar-3.5.0/src/FlexbarIO.h:80:13: [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 const * VALUE[1]; data/flexbar-3.5.0/src/FlexbarIO.h:123:13: [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 const * VALUE[1]; data/flexbar-3.5.0/src/FlexbarIO.h:172:13: [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 const * VALUE[1]; data/flexbar-3.5.0/src/FlexbarIO.h:290: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). if(! open(seqFileIn, path.c_str())){ data/flexbar-3.5.0/src/LoadFasta.h:38: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). if(! open(seqFileIn, filePath.c_str())){ data/flexbar-3.5.0/src/SeqInput.h:45:9: [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). if(! open(seqFileIn, cin)){ data/flexbar-3.5.0/src/SeqInput.h:51:9: [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). if(! open(seqFileIn, filePath.c_str())){ data/flexbar-3.5.0/src/SeqOutput.h:59:9: [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). if(! open(seqFileOut, cout)){ data/flexbar-3.5.0/src/SeqOutput.h:65:9: [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). if(! open(seqFileOut, m_filePath.c_str())){ data/flexbar-3.5.0/src/SeqOutput.h:91:11: [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). lstream.open(fname.c_str(), ios::out | ios::binary); data/flexbar-3.5.0/src/SeqAlign.h:32:159: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SeqAlign(tbb::concurrent_vector<flexbar::TBar> *queries, const Options &o, int minOverlap, float errorRate, const int tailLength, const int match, const int mismatch, const int gapCost, const bool isBarcoding): data/flexbar-3.5.0/src/SeqAlign.h:50:32: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. m_algo(TAlgorithm(o, match, mismatch, gapCost, ! isBarcoding)){ data/flexbar-3.5.0/src/SeqAlignAlgo.h:29:60: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SeqAlignAlgo(const Options &o, const int match, const int mismatch, const int gapCost, const bool isAdapterRm): data/flexbar-3.5.0/src/SeqAlignAlgo.h:44:54: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. else setScore(m_scoreMatrix, TChar(i), TChar(j), mismatch); data/flexbar-3.5.0/src/SeqAlignPair.h:31:105: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. SeqAlignPair(const Options &o, const int minOverlap, const float errorRate, const int match, const int mismatch, const int gapCost): data/flexbar-3.5.0/src/SeqAlignPair.h:46:32: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. m_algo(TAlgorithm(o, match, mismatch, gapCost, true)){ ANALYSIS SUMMARY: Hits = 18 Lines analyzed = 5146 in approximately 0.38 seconds (13599 lines/second) Physical Source Lines of Code (SLOC) = 3507 Hits@level = [0] 0 [1] 6 [2] 12 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 18 [1+] 18 [2+] 12 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 5.13259 [1+] 5.13259 [2+] 3.42173 [3+] 0 [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.