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/andi-0.13/libs/pfasta.c
Examining data/andi-0.13/libs/pfasta.h
Examining data/andi-0.13/opt/compat-stdlib.h
Examining data/andi-0.13/opt/compat-string.h
Examining data/andi-0.13/opt/reallocarray.c
Examining data/andi-0.13/opt/strchrnul.c
Examining data/andi-0.13/src/andi.c
Examining data/andi-0.13/src/dist_hack.h
Examining data/andi-0.13/src/esa.c
Examining data/andi-0.13/src/esa.h
Examining data/andi-0.13/src/global.h
Examining data/andi-0.13/src/io.c
Examining data/andi-0.13/src/io.h
Examining data/andi-0.13/src/model.c
Examining data/andi-0.13/src/model.h
Examining data/andi-0.13/src/process.c
Examining data/andi-0.13/src/process.h
Examining data/andi-0.13/src/sequence.c
Examining data/andi-0.13/src/sequence.h
Examining data/andi-0.13/test/test_esa.c
Examining data/andi-0.13/test/test_fasta.cxx
Examining data/andi-0.13/test/test_process.c
Examining data/andi-0.13/test/test_seq.c

FINAL RESULTS:

data/andi-0.13/libs/pfasta.c:92:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		(void)snprintf(errstr_buffer, PF_ERROR_STRING_LENGTH, __VA_ARGS__);    \
data/andi-0.13/src/io.c:310:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf(FLAGS & F_TRUNCATE_NAMES ? "%-10.10s" : "%-10s",
data/andi-0.13/src/io.c:315:4:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			printf(use_scientific ? " %1.4e" : " %1.4f", DD(i, j));
data/andi-0.13/src/andi.c:92:11:  [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.
		int c = getopt_long(argc, argv, "jvht:p:m:b:l", long_options,
data/andi-0.13/test/test_fasta.cxx:27:17:  [3] (buffer) getopt:
  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((check = getopt(argc, argv, "s:l:L:d:r")) != -1){
data/andi-0.13/libs/pfasta.c:48:14:  [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.
thread_local char errstr_buffer[PF_ERROR_STRING_LENGTH];
data/andi-0.13/libs/pfasta.c:209: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(&chunk, begin + vec_offset * vec_size, vec_size);
data/andi-0.13/libs/pfasta.c:532:2:  [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(ds->str + ds->count, str, length);
data/andi-0.13/src/esa.c:79: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 str[CACHE_LENGTH + 1];
data/andi-0.13/src/io.c:104: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).
	FILE *file = strcmp(file_name, "-") ? fopen(file_name, "r") : stdin;
data/andi-0.13/src/io.c:200:28:  [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).
		strcmp(file_name, "-") ? open(file_name, O_RDONLY) : STDIN_FILENO;
data/andi-0.13/src/sequence.c:109:2:  [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(next, it->S, it->len);
data/andi-0.13/src/sequence.c:114: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(next, it->S, it->len);
data/andi-0.13/src/sequence.c:186:2:  [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(rev + len + 1, s, len + 1);
data/andi-0.13/test/test_esa.c:178: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 str[MAX_DEPTH+1];
data/andi-0.13/test/test_fasta.cxx:76: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 line[line_length+1];
data/andi-0.13/libs/pfasta.c:144:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t count = read(pp->file_descriptor, pp->buffer, BUFFER_SIZE);
data/andi-0.13/src/andi.c:288:37:  [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 ((FLAGS & F_TRUNCATE_NAMES) && strlen(seq->name) > 10) {
data/andi-0.13/src/dist_hack.h:78:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#pragma omp atomic read
data/andi-0.13/src/io.c:132:7:  [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 (strlen(str) == 0) {
data/andi-0.13/src/sequence.c:248: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).
	S->len = strlen(S->S);

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 3987 in approximately 0.11 seconds (36120 lines/second)
Physical Source Lines of Code (SLOC) = 2366
Hits@level = [0]  10 [1]   5 [2]  11 [3]   2 [4]   3 [5]   0
Hits@level+ = [0+]  31 [1+]  21 [2+]  16 [3+]   5 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 13.1023 [1+] 8.87574 [2+] 6.76247 [3+] 2.11327 [4+] 1.26796 [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.