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/kmerresistance-2.2.0/KmerResistance.c
Examining data/kmerresistance-2.2.0/pherror.c
Examining data/kmerresistance-2.2.0/pherror.h
Examining data/kmerresistance-2.2.0/qseqs.c
Examining data/kmerresistance-2.2.0/qseqs.h

FINAL RESULTS:

data/kmerresistance-2.2.0/KmerResistance.c:150:5:  [4] (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).
				strcpy(outputfilename, argv[args]);
data/kmerresistance-2.2.0/KmerResistance.c:160:5:  [4] (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).
				strcpy(t_db, argv[args]);
data/kmerresistance-2.2.0/KmerResistance.c:170:5:  [4] (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).
				strcpy(s_db, argv[args]);
data/kmerresistance-2.2.0/KmerResistance.c:254:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	KMA_call_len = sprintf(KMA_call, "%s ", KMA_dest);
data/kmerresistance-2.2.0/KmerResistance.c:270:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			KMA_call_len += sprintf(KMA_call + KMA_call_len, "%s ", argv[args]);
data/kmerresistance-2.2.0/KmerResistance.c:278:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(KMA_call, "%s%s", KMA_call, t_db);
data/kmerresistance-2.2.0/KmerResistance.c:279:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if(system(KMA_call) != 0) {
data/kmerresistance-2.2.0/KmerResistance.c:287:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(KMA_call, "%s%s -Sparse", KMA_call, s_db);
data/kmerresistance-2.2.0/KmerResistance.c:288:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if(system(KMA_call) != 0) {
data/kmerresistance-2.2.0/KmerResistance.c:135:2:  [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(KMA_dest, "kma");
data/kmerresistance-2.2.0/KmerResistance.c:151:5:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				strcat(outputfilename, ".KmerRes");
data/kmerresistance-2.2.0/KmerResistance.c:274:18:  [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.
	KMA_call_len += sprintf(KMA_call + KMA_call_len, "-t_db ");
data/kmerresistance-2.2.0/KmerResistance.c:310:2:  [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((outputfilename + out_len), ".spa");
data/kmerresistance-2.2.0/KmerResistance.c:353:2:  [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((outputfilename + out_len), ".res");
data/kmerresistance-2.2.0/pherror.c:39: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(filename, mode);
data/kmerresistance-2.2.0/KmerResistance.c:36:9:  [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).
	len1 = strlen(str1);
data/kmerresistance-2.2.0/KmerResistance.c:37:9:  [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).
	len2 = strlen(str2);
data/kmerresistance-2.2.0/KmerResistance.c:59:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((c = fgetc(file)) != EOF) {
data/kmerresistance-2.2.0/KmerResistance.c:92:48:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define skipLine(file, c, stopChar) while((c = fgetc(file)) != EOF && c != stopChar)
data/kmerresistance-2.2.0/KmerResistance.c:144:22:  [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).
				KMA_call_len += (strlen(argv[args]) + 4);
data/kmerresistance-2.2.0/KmerResistance.c:145:15:  [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).
				out_len = strlen(argv[args]);
data/kmerresistance-2.2.0/KmerResistance.c:156:27:  [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).
				t_db = (char*) calloc(strlen(argv[args]) + 1, sizeof(char));
data/kmerresistance-2.2.0/KmerResistance.c:161:22:  [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).
				KMA_call_len += (strlen(argv[args]) + 1);
data/kmerresistance-2.2.0/KmerResistance.c:166:27:  [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).
				s_db = (char*) calloc(strlen(argv[args]) + 1, sizeof(char));
data/kmerresistance-2.2.0/KmerResistance.c:171:22:  [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).
				KMA_call_len += (strlen(argv[args]) + 1);
data/kmerresistance-2.2.0/KmerResistance.c:218:21:  [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).
				KMA_call_len += strlen(argv[args]);
data/kmerresistance-2.2.0/KmerResistance.c:226:20:  [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).
			KMA_call_len += strlen(argv[args]) + 1;
data/kmerresistance-2.2.0/KmerResistance.c:232:23:  [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).
						KMA_call_len += strlen(argv[args]) + 1;
data/kmerresistance-2.2.0/pherror.c:55:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			if(0 < (nmemb = read(fileno(stream), ptr, size))) {
data/kmerresistance-2.2.0/pherror.c:59:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
				usleep(1000);

ANALYSIS SUMMARY:

Hits = 30
Lines analyzed = 580 in approximately 0.13 seconds (4481 lines/second)
Physical Source Lines of Code (SLOC) = 422
Hits@level = [0]  46 [1]  15 [2]   6 [3]   0 [4]   9 [5]   0
Hits@level+ = [0+]  76 [1+]  30 [2+]  15 [3+]   9 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 180.095 [1+] 71.09 [2+] 35.545 [3+] 21.327 [4+] 21.327 [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.