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/mindthegap-2.2.2/src/CircularBuffer.hpp
Examining data/mindthegap-2.2.2/src/Filler.cpp
Examining data/mindthegap-2.2.2/src/Filler.hpp
Examining data/mindthegap-2.2.2/src/FindBackup.hpp
Examining data/mindthegap-2.2.2/src/FindBreakpoints.hpp
Examining data/mindthegap-2.2.2/src/FindDeletion.hpp
Examining data/mindthegap-2.2.2/src/FindHeteroInsertion.hpp
Examining data/mindthegap-2.2.2/src/FindInsertion.hpp
Examining data/mindthegap-2.2.2/src/FindSNP.hpp
Examining data/mindthegap-2.2.2/src/Finder.cpp
Examining data/mindthegap-2.2.2/src/Finder.hpp
Examining data/mindthegap-2.2.2/src/GraphAnalysis.cpp
Examining data/mindthegap-2.2.2/src/GraphAnalysis.hpp
Examining data/mindthegap-2.2.2/src/GraphOutputDot.cpp
Examining data/mindthegap-2.2.2/src/GraphOutputDot.hpp
Examining data/mindthegap-2.2.2/src/IFindObserver.hpp
Examining data/mindthegap-2.2.2/src/IGraphOutput.cpp
Examining data/mindthegap-2.2.2/src/IGraphOutput.hpp
Examining data/mindthegap-2.2.2/src/Utils.cpp
Examining data/mindthegap-2.2.2/src/Utils.hpp
Examining data/mindthegap-2.2.2/src/main.cpp
Examining data/mindthegap-2.2.2/src/nwAlign/nwalign.cpp
Examining data/mindthegap-2.2.2/test/eval.cpp

FINAL RESULTS:

data/mindthegap-2.2.2/src/GraphAnalysis.cpp:46:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(node_id,"%d%s",(node>nb_nodes)?(node-nb_nodes):node, (node<nb_nodes)?"f":"r");
data/mindthegap-2.2.2/src/GraphAnalysis.cpp:94:13:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
            sscanf(line.c_str(), "%*d %*s %*d %*[^\"]%*[\"]%s%*[\"]",label); // ugly regexp to get the label of the edge
data/mindthegap-2.2.2/src/GraphAnalysis.cpp:375:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(node_str,"%s",node_sequence.c_str());
data/mindthegap-2.2.2/src/Filler.cpp:154:9:  [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       buf[80];
data/mindthegap-2.2.2/src/Filler.cpp:228:20:  [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).
    _insert_file = fopen(_insert_file_name.c_str(), "w");
data/mindthegap-2.2.2/src/Filler.cpp:235:25:  [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).
    _insert_info_file = fopen(_insert_info_file_name.c_str(), "w");
data/mindthegap-2.2.2/src/Filler.cpp:246:21:  [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).
        _vcf_file = fopen(_vcf_file_name.c_str(), "w");
data/mindthegap-2.2.2/src/Filler.cpp:260:21:  [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).
        _gfa_file = fopen(_gfa_file_name.c_str(),"w");
data/mindthegap-2.2.2/src/Filler.cpp:726:18:  [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).
        seedFile.open (seedFileName);
data/mindthegap-2.2.2/src/Filler.cpp:1125:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int pos = atoi(tokens[3].c_str())-repeatSize;
data/mindthegap-2.2.2/src/Filler.cpp:1135:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            int pos = atoi(tokens[4].c_str())-repeatSize;
data/mindthegap-2.2.2/src/FindDeletion.hpp:152:2:  [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(del_sequence,"%.*s", del_size+1, this->_find->chrom_seq()+del_start_pos);
data/mindthegap-2.2.2/src/FindDeletion.hpp:154:2:  [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(alt_char,"%.*s", 1, del_sequence);
data/mindthegap-2.2.2/src/FindSNP.hpp:342:4:  [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 ref_char [2];
data/mindthegap-2.2.2/src/FindSNP.hpp:345:4:  [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 alt_char [2];
data/mindthegap-2.2.2/src/FindSNP.hpp:504:5:  [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 ref_char [2];
data/mindthegap-2.2.2/src/FindSNP.hpp:507:5:  [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 alt_char [2];
data/mindthegap-2.2.2/src/FindSNP.hpp:643:4:  [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 ref_char [2];
data/mindthegap-2.2.2/src/FindSNP.hpp:646:4:  [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 alt_char [2];
data/mindthegap-2.2.2/src/Finder.cpp:207:9:  [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       buf[80];
data/mindthegap-2.2.2/src/Finder.cpp:282:24:  [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).
    _breakpoint_file = fopen(_breakpoint_file_name.c_str(), "w");
data/mindthegap-2.2.2/src/Finder.cpp:290:17:  [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).
    _vcf_file = fopen(_vcf_file_name.c_str(), "w");
data/mindthegap-2.2.2/src/Finder.cpp:300:22:  [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).
    _refBank = Bank::open(getInput()->getStr(STR_URI_REF)); // more general can be a list or a file of files
data/mindthegap-2.2.2/src/GraphAnalysis.cpp:45:5:  [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 node_id[10];
data/mindthegap-2.2.2/src/GraphAnalysis.cpp:93: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.
            char label[100]; //needs to be large enough for the regexp below
data/mindthegap-2.2.2/src/GraphAnalysis.cpp:374:17:  [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 node_str[node_sequence.length()+1];
data/mindthegap-2.2.2/src/GraphOutputDot.cpp:60:22:  [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).
    _graph_file    = fopen (_dot_file_name.c_str(),          erase ? "w":"a");
data/mindthegap-2.2.2/src/IGraphOutput.cpp:59:26:  [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).
    IBank* Nodes = Bank::open (linear_seqs_name);    LOCAL (Nodes);
data/mindthegap-2.2.2/src/IGraphOutput.cpp:102:26:  [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).
    IBank* Nodes = Bank::open (linear_seqs_name);    LOCAL (Nodes);
data/mindthegap-2.2.2/test/eval.cpp:184:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				min_qual = atoi(argv[n_a+1]);
data/mindthegap-2.2.2/test/eval.cpp:187:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				nw = atoi(argv[n_a+1]);
data/mindthegap-2.2.2/test/eval.cpp:196:19:  [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).
	FILE * log_err = fopen("log_err","w");
data/mindthegap-2.2.2/test/eval.cpp:197:20:  [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).
	FILE * log_true = fopen("log_true","w");
data/mindthegap-2.2.2/test/eval.cpp:201:20:  [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).
	FILE *ref_fasta = fopen(argv[1], "r");
data/mindthegap-2.2.2/test/eval.cpp:222:2:  [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 tempheader [2000];
data/mindthegap-2.2.2/test/eval.cpp:225:2:  [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 hid [2000];
data/mindthegap-2.2.2/test/eval.cpp:301:23:  [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).
	FILE *insert_fasta = fopen(argv[3], "r");
data/mindthegap-2.2.2/test/eval.cpp:408:15:  [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).
	FILE *bkpt = fopen(argv[2], "r");
data/mindthegap-2.2.2/src/FindBreakpoints.hpp:638:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		variant_size = strlen(ref_char) - 1;

ANALYSIS SUMMARY:

Hits = 39
Lines analyzed = 7049 in approximately 0.19 seconds (37931 lines/second)
Physical Source Lines of Code (SLOC) = 4101
Hits@level = [0]  54 [1]   1 [2]  35 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]  93 [1+]  39 [2+]  38 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 22.6774 [1+] 9.50988 [2+] 9.26603 [3+] 0.731529 [4+] 0.731529 [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.