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/snpomatic-1.0/src/TAlignmentOutput.cpp
Examining data/snpomatic-1.0/src/TChromosomalIndices.cpp
Examining data/snpomatic-1.0/src/TChromosome.cpp
Examining data/snpomatic-1.0/src/TChromosomeAlign.cpp
Examining data/snpomatic-1.0/src/findknownsnps.cpp
Examining data/snpomatic-1.0/src/global_functions.cpp
Examining data/snpomatic-1.0/src/mapcontigs.cpp
Examining data/snpomatic-1.0/src/reassemble.cpp
Examining data/snpomatic-1.0/src/snpomatic.h
Examining data/snpomatic-1.0/src/variety.cpp
Examining data/snpomatic-1.0/src/ungap.cpp

FINAL RESULTS:

data/snpomatic-1.0/src/TChromosomeAlign.cpp:506:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf ( dummy , "SNP\t%s\t%d\t%c\t%c\n" , (*chrs)[res[a].chromosome].name.c_str() , pos[c] , o[c] , n[c] ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:545:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf ( tmp , "/*P|%s|%9d*/ INSERT INTO %s_perfect_match (read_name,pos1,pos2) VALUES (\"%s\",%d,%d);" , chrn , pos1 , chrn , last_solexa_name.c_str() , pos1+1 , pos2+1 ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:565:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf ( tmp , "/*%c|%s|%9d*/ INSERT INTO %s%s (read_name,seq1,pos1) VALUES (\"%s\",\"%s\",%d);" , 
data/snpomatic-1.0/src/TChromosomeAlign.cpp:570:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf ( tmp , "/*%c|%s|%9d*/ INSERT INTO %s%s (read_name,seq1,pos1,seq2,pos2%s) VALUES (\"%s\",\"%s\",%d,\"%s\",%d%s);" , 
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1222:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf ( c2 , "%s\t%d\t%d\t%s\t%c" , s.c_str() , chr , from , refseq.c_str() , rc ? 'X' : ' ' ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1253:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
					sprintf ( c2 , "%s\t%d\t%c\t%c\n" , (*chrs)[_chr].name.c_str() , thepos , the_c , vs[3][d] ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:157:22:  [3] (buffer) getopt_long:
  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.
	while ( -1 != ( c = getopt_long (argc, argv, "g:a::q::s::f::p::b::r::w::n::",long_options, NULL) ) ) {
data/snpomatic-1.0/src/mapcontigs.cpp:48:22:  [3] (buffer) getopt_long:
  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.
	while ( -1 != ( c = getopt_long (argc, argv, "g:a::o::s::f::p::b::m::",long_options, NULL) ) ) {
data/snpomatic-1.0/src/reassemble.cpp:764:22:  [3] (buffer) getopt_long:
  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.
	while ( -1 != ( c = getopt_long (argc, argv, "g:a::q::s::f::p::b::r::w::n::",long_options, NULL) ) ) {
data/snpomatic-1.0/src/ungap.cpp:187:22:  [3] (buffer) getopt_long:
  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.
	while ( -1 != ( c = getopt_long (argc, argv, "g:a::q::s::f::p::b::r::w::n::",long_options, NULL) ) ) {
data/snpomatic-1.0/src/variety.cpp:73:22:  [3] (buffer) getopt_long:
  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.
	while ( -1 != ( c = getopt_long (argc, argv, "g:a::q::s::f::p::b::r::w::n::",long_options, NULL) ) ) {
data/snpomatic-1.0/src/TChromosomalIndices.cpp:20:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:21: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 dummy[READ_CHAR_BUFFER] , *c ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:121: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 dummy[READ_CHAR_BUFFER] , *c ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:163:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:164: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 dummy[READ_CHAR_BUFFER] ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:180:15:  [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).
		uint from = atoi ( parts[1].c_str() ) - 1 ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:181:13:  [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).
		uint to = atoi ( parts[2].c_str() ) - 1 ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:256:30:  [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).
	if ( !index_file.empty() && fopen ( index_file.c_str() , "r" ) ) {
data/snpomatic-1.0/src/TChromosomalIndices.cpp:346:3:  [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 ( tmp , begin , index_length_double ) ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:381: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 *file = fopen ( string ( filename.c_str() ).c_str() , "w" ) ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:407: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 *file = fopen ( string ( filename.c_str() ).c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:473: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).
	FILE *u = fopen ( filename.c_str() , "w" ) ;
data/snpomatic-1.0/src/TChromosome.cpp:8:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosome.cpp:9: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosome.cpp:48:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosome.cpp:50: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosome.cpp:61:13:  [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 ( parts[3].c_str() ) ;
data/snpomatic-1.0/src/TChromosome.cpp:89:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosome.cpp:90: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosome.cpp:99:13:  [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 ( parts[1].c_str() ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:89:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:90: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:462: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 dummy[READ_CHAR_BUFFER] ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:544: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 tmp[1000] , *chrn = (char*) (*chrs)[chr].name.c_str() ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:548: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 tmp[1000] , *chrn = (char*) (*chrs)[chr].name.c_str() ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:799: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 cigar[100] ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:800: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 ( cigar , "%dM" , (int) seq.length() ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:814: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 mismatches[1000] ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:815: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 ( mismatches , "\tNM:i:%d" , count_snpsinreads ( seq , chr , pos ) ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:926:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy ( c , "sqlite_cache_XXXXXXXX" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:927:11:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
		close ( mkstemp ( c ) ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:930:18:  [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).
		sqlite_cache = fopen ( c , "w" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:965: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).
	sqlite_cache = fopen ( sqlite_cache_name.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:966: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1017:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1025: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).
		file2 = fopen ( filename2.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1038: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 predicted_insert_size[100] ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1039: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 ( predicted_insert_size , "\tPI:%d" , fragment_length - read_length_1 * 2 ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1052: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1066:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy ( dummy , "@dummy" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1166: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 c2[50000] ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1236: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).
				int _chr = atoi ( vs[1].c_str() ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1237: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).
				int _pos = atoi ( vs[2].c_str() ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1262:16:  [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 * file = fopen ( output_filename.c_str() , "w" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1277:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1283: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1355:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1360: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 dummy[READ_CHAR_BUFFER] , *c ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1536: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 cig[READ_CHAR_BUFFER] ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1558:6:  [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 ( cig , "%c %d" , last , cnt ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1561:7:  [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 ( cig , " I %d" , cnt ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1569: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 ( cig , " %c %d" , last , cnt ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1572:4:  [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 ( cig , " I %d" , cnt ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1578: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 ( cig , "M %d" , (int)sequence.length() ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1609:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1614: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/findknownsnps.cpp:177:29:  [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).
			case 'i' : pair_length = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:183:26:  [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).
			case 'v' : variance = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:184:29:  [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).
			case 'Y' : memory_save = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:185:33:  [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).
			case 't' : fragment_length = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:186:22:  [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).
			case 'm' : mspi = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:187:32:  [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).
			case '1' : index_length_1 = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:188:32:  [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).
			case '2' : index_length_2 = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:189:22:  [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).
			case '3' : chop = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:191:27:  [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).
			case '5' : wobblemax = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:194:28:  [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).
			case '8' : index_from = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:195:26:  [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).
			case '9' : index_to = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:196:45:  [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).
			case 'M' : globally_allowed_mismatches = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/findknownsnps.cpp:254: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 tmp[10000] ;
data/snpomatic-1.0/src/findknownsnps.cpp:269:42:  [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).
	if ( !pileup_file.empty() ) ca.pileup = fopen ( pileup_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:270:40:  [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).
	if ( !cigar_file.empty() ) ca.cigar = fopen ( cigar_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:271:49:  [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).
	if ( !fragmentplot.empty() ) ca.fragmentplot = fopen ( fragmentplot.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:272:48:  [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).
	if ( !indelplot_file.empty() ) ca.indelplot = fopen ( indelplot_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:273:37:  [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).
	if ( !gffout.empty() ) ca.gffout = fopen ( gffout.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:274:47:  [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).
	if ( !snpsinreads.empty() ) ca.snpsinreads = fopen ( snpsinreads.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:275:42:  [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).
	if ( !face_away.empty() ) ca.faceaway = fopen ( face_away.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:276:46:  [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).
	if ( !coverage_file.empty() ) ca.coverage = fopen ( coverage_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:277:50:  [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).
	if ( !inversions_file.empty() ) ca.inversions = fopen ( inversions_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:278:37:  [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).
	if ( !sqlite.empty() ) ca.sqlite = fopen ( sqlite.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:279:36:  [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).
	if ( !sam_file.empty() ) ca.sam = fopen ( sam_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:280:47:  [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).
	if ( !spancontigs.empty() ) ca.spancontigs = fopen ( spancontigs.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:281:31:  [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).
	if ( !rpa.empty() ) ca.rpa = fopen ( rpa.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:283: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).
		ca.featuretable = fopen ( featuretable.c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:290:50:  [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).
		if ( binmask[0] == '1' ) ca.binfile_no_match = fopen ( string ( bin_prefix + "_no_match" + ext ).c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:291:54:  [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).
		if ( binmask[1] == '1' ) ca.binfile_single_match = fopen ( string ( bin_prefix + "_single_match" + ext ).c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:292:53:  [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).
		if ( binmask[2] == '1' ) ca.binfile_multi_match = fopen ( string ( bin_prefix + "_multi_match" + ext ).c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:293:47:  [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).
		if ( binmask[3] == '1' ) ca.binfile_iupac = fopen ( string ( bin_prefix + "_iupac" + ext ).c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:300:43:  [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).
		if ( !wobble_file.empty() ) ca.wobble = fopen ( string ( wobble_file ).c_str() , "w" ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:311:43:  [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).
		if ( !wobble_file.empty() ) ca.wobble = fopen ( string ( wobble_file ).c_str() , "w" ) ;
data/snpomatic-1.0/src/global_functions.cpp:108:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/global_functions.cpp:113: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/global_functions.cpp:159:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/global_functions.cpp:161: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/global_functions.cpp:176:13:  [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 ( parts[3].c_str() ) ;
data/snpomatic-1.0/src/global_functions.cpp:210:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/global_functions.cpp:212: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/global_functions.cpp:235:13:  [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 ( parts[1].c_str() ) ;
data/snpomatic-1.0/src/mapcontigs.cpp:55:33:  [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).
			case 'm' : min_contig_size = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:302:16:  [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 * file = fopen ( filename.c_str() , "r" ) ;
data/snpomatic-1.0/src/reassemble.cpp:307: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 dummy[READ_CHAR_BUFFER] , *c1 , *c2 ;
data/snpomatic-1.0/src/reassemble.cpp:315:4:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
			strcpy ( dummy , "@dummy" ) ;
data/snpomatic-1.0/src/reassemble.cpp:781:29:  [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).
			case 'i' : pair_length = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:786:26:  [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).
			case 'v' : variance = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:787:33:  [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).
			case 't' : fragment_length = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:788:22:  [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).
			case 'm' : mspi = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:789:32:  [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).
			case '1' : index_length_1 = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:790:32:  [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).
			case '2' : index_length_2 = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:791:22:  [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).
			case '3' : chop = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/reassemble.cpp:793:27:  [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).
			case '5' : wobblemax = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/snpomatic.h:155: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 tmp[READ_CHAR_BUFFER] ;
data/snpomatic-1.0/src/ungap.cpp:198:29:  [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).
			case 'i' : pair_length = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/ungap.cpp:199:33:  [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).
			case 't' : fragment_length = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/ungap.cpp:200:26:  [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).
			case 'v' : variance = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/ungap.cpp:201:22:  [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).
			case 'm' : mspi = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/ungap.cpp:202:22:  [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).
			case 'r' : from = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/ungap.cpp:203:20:  [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).
			case 'o' : to = atoi ( optarg ) ; break ;
data/snpomatic-1.0/src/ungap.cpp:246:46:  [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).
	if ( !coverage_file.empty() ) ca.coverage = fopen ( coverage_file.c_str() , "w" ) ;
data/snpomatic-1.0/src/ungap.cpp:266:10:  [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).
	filestr.open ( fasta_output.c_str() , fstream::out ); //| fstream::app);
data/snpomatic-1.0/src/TChromosomalIndices.cpp:80:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool TChromosomalIndices::align_read2contigs ( char *read , vector <string> &vs ) {
data/snpomatic-1.0/src/TChromosomalIndices.cpp:88:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ( vs[a] == read ) return ret ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:102:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				m += read ;
data/snpomatic-1.0/src/TChromosomalIndices.cpp:116:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ( !ret ) vs.push_back ( read ) ; // New contig since it doesn't match old ones
data/snpomatic-1.0/src/TChromosomeAlign.cpp:273:11:  [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).
	uint l = strlen ( _seq ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1395:63:  [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).
		if ( !invalid && !single_read_length ) single_read_length = strlen ( dummy ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1396:56:  [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).
		int m = invalid ? -1 : align_solexa_read ( dummy , q[strlen(dummy)] ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1421:11:  [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).
	uint l = strlen ( _seq ) ;
data/snpomatic-1.0/src/TChromosomeAlign.cpp:1489:11:  [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).
	uint l = strlen ( seq ) ;
data/snpomatic-1.0/src/findknownsnps.cpp:258:17:  [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).
		pair_length = strlen ( tmp ) ;
data/snpomatic-1.0/src/reassemble.cpp:263:8:  [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.
		if ( mismatch > match / 3 ) continue ;
data/snpomatic-1.0/src/reassemble.cpp:264:23:  [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.
		int total = match + mismatch ;
data/snpomatic-1.0/src/reassemble.cpp:265:8:  [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.
		if ( mismatch < best ) {
data/snpomatic-1.0/src/reassemble.cpp:266:11:  [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.
			best = mismatch ;
data/snpomatic-1.0/src/snpomatic.h:153:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bool align_read2contigs ( char *read , vector <string> &vs ) ;

ANALYSIS SUMMARY:

Hits = 144
Lines analyzed = 4813 in approximately 0.20 seconds (23645 lines/second)
Physical Source Lines of Code (SLOC) = 3491
Hits@level = [0] 103 [1]  15 [2] 118 [3]   5 [4]   6 [5]   0
Hits@level+ = [0+] 247 [1+] 144 [2+] 129 [3+]  11 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 70.7534 [1+] 41.2489 [2+] 36.9522 [3+] 3.15096 [4+] 1.71871 [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.