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/phylonium-1.3/libs/seqcmp_avx512.c
Examining data/phylonium-1.3/libs/revseqcmp.c
Examining data/phylonium-1.3/libs/seqcmp.h
Examining data/phylonium-1.3/libs/revseqcmp.h
Examining data/phylonium-1.3/libs/seqcmp.c
Examining data/phylonium-1.3/libs/reallocarray.c
Examining data/phylonium-1.3/libs/pfasta.h
Examining data/phylonium-1.3/libs/revseqcmp_ssse3.c
Examining data/phylonium-1.3/libs/seqcmp_sse2.c
Examining data/phylonium-1.3/libs/seqcmp_avx2.c
Examining data/phylonium-1.3/libs/compat-stdlib.h
Examining data/phylonium-1.3/libs/revseqcmp_avx2.c
Examining data/phylonium-1.3/libs/pfasta.c
Examining data/phylonium-1.3/src/process.h
Examining data/phylonium-1.3/src/sequence.h
Examining data/phylonium-1.3/src/evo_model.cxx
Examining data/phylonium-1.3/src/phylonium.cxx
Examining data/phylonium-1.3/src/io.h
Examining data/phylonium-1.3/src/process.cxx
Examining data/phylonium-1.3/src/esa.cxx
Examining data/phylonium-1.3/src/evo_model.h
Examining data/phylonium-1.3/src/global.h
Examining data/phylonium-1.3/src/io.cxx
Examining data/phylonium-1.3/src/esa.h
Examining data/phylonium-1.3/src/sequence.cxx
Examining data/phylonium-1.3/test/simf.cxx
Examining data/phylonium-1.3/test/catch.hpp
Examining data/phylonium-1.3/test/Tsequence.cxx
Examining data/phylonium-1.3/test/Tprocess.cxx
Examining data/phylonium-1.3/test/Tmain.cxx

FINAL RESULTS:

data/phylonium-1.3/libs/pfasta.c:98: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/phylonium-1.3/src/phylonium.cxx:119:4:  [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.
			getopt_long(argc, argv, "2b:hp:r:t:v", long_options, &option_index);
data/phylonium-1.3/test/catch.hpp:4498:1:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
random(T a, T b) {
data/phylonium-1.3/test/catch.hpp:4507:1:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
random(T a, T b) {
data/phylonium-1.3/test/catch.hpp:11724:18:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            std::srand( config.rngSeed() );
data/phylonium-1.3/test/simf.cxx:35:18:  [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, "d:hl:L:p:rs:")) != -1) {
data/phylonium-1.3/libs/pfasta.c:54: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/phylonium-1.3/libs/pfasta.c:216: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/phylonium-1.3/libs/pfasta.c:542: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/phylonium-1.3/libs/revseqcmp_avx2.c:32: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(&b, self + vec_offset * vec_size, vec_size);
data/phylonium-1.3/libs/revseqcmp_avx2.c:35: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(&o, other + pos, vec_size);
data/phylonium-1.3/libs/seqcmp_avx2.c:29: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(&begin_chunk, begin + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_avx2.c:30: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(&other_chunk, other + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_avx2.c:39: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(&begin_chunk, begin + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_avx2.c:40: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(&other_chunk, other + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_avx512.c:29: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(&begin_chunk, begin + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_avx512.c:30: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(&other_chunk, other + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_sse2.c:29: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(&begin_chunk, begin + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_sse2.c:30: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(&other_chunk, other + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_sse2.c:39: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(&begin_chunk, begin + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/libs/seqcmp_sse2.c:40: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(&other_chunk, other + vec_offset * vec_bytes, vec_bytes);
data/phylonium-1.3/src/esa.cxx:88: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/phylonium-1.3/src/io.cxx:61:24:  [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).
	int file_descriptor = open(file_name, O_RDONLY);
data/phylonium-1.3/test/catch.hpp:2128: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 timeStamp[timeStampSize];
data/phylonium-1.3/test/catch.hpp:4361:29:  [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.
        alignas(alignof(T)) char storage[sizeof(T)];
data/phylonium-1.3/test/catch.hpp:5763:16:  [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 line[CATCH_CONFIG_CONSOLE_WIDTH] = {0};
data/phylonium-1.3/test/catch.hpp:7282:14:  [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).
        void open();
data/phylonium-1.3/test/catch.hpp:11056:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &f, sizeof(f));
data/phylonium-1.3/test/catch.hpp:11065:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(&i, &d, sizeof(d));
data/phylonium-1.3/test/catch.hpp:11523: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 m_buffer[L_tmpnam] = { 0 };
data/phylonium-1.3/test/catch.hpp:11610: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 buffer[100];
data/phylonium-1.3/test/catch.hpp:11619:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
        m_file = std::tmpfile();
data/phylonium-1.3/test/catch.hpp:11643: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 buffer[100] = {};
data/phylonium-1.3/test/catch.hpp:12065:30:  [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).
                    tracker->open();
data/phylonium-1.3/test/catch.hpp:12845:31:  [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 **utf8Argv = new char *[ argc ];
data/phylonium-1.3/test/catch.hpp:13004: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 data[bufferSize];
data/phylonium-1.3/test/catch.hpp:13053:23:  [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).
                m_ofs.open( filename.c_str() );
data/phylonium-1.3/test/catch.hpp:13302:13:  [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( m_data, m_start, m_size );
data/phylonium-1.3/test/catch.hpp:13823:23:  [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).
    void TrackerBase::open() {
data/phylonium-1.3/test/catch.hpp:13923:13:  [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).
            open();
data/phylonium-1.3/test/catch.hpp:14299:21:  [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 asChar[sizeof (int)];
data/phylonium-1.3/test/catch.hpp:14968: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 buffer[maxDoubleSize];
data/phylonium-1.3/test/catch.hpp:14975:14:  [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.
        std::sprintf(buffer, "%.3f", duration);
data/phylonium-1.3/test/catch.hpp:15568: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).
    void open() {
data/phylonium-1.3/test/catch.hpp:15603:12:  [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).
        tp.open();
data/phylonium-1.3/test/catch.hpp:15980: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 timeStamp[timeStampSize];
data/phylonium-1.3/test/simf.cxx:97: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/phylonium-1.3/libs/pfasta.c:150: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/phylonium-1.3/libs/seqcmp_avx2.c:48:43:  [1] (buffer) equal:
  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.
	substitutions = vec_offset * vec_bytes - equal;
data/phylonium-1.3/libs/seqcmp_avx512.c:36:43:  [1] (buffer) equal:
  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.
	substitutions = vec_length * vec_bytes - equal;
data/phylonium-1.3/libs/seqcmp_sse2.c:48:43:  [1] (buffer) equal:
  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.
	substitutions = vec_offset * vec_bytes - equal;
data/phylonium-1.3/src/process.cxx:526:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#pragma omp atomic read
data/phylonium-1.3/test/catch.hpp:3625:29:  [1] (buffer) is_permutation:
  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.
                return std::is_permutation(m_target.begin(), m_target.end(), vec.begin());
data/phylonium-1.3/test/catch.hpp:12874:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/phylonium-1.3/test/catch.hpp:12879:36:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static_cast<void>(std::getchar());
data/phylonium-1.3/test/catch.hpp:13176:50:  [1] (buffer) equal:
  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.
        return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin());
data/phylonium-1.3/test/catch.hpp:13182:50:  [1] (buffer) equal:
  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.
        return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin());
data/phylonium-1.3/test/catch.hpp:13268:67:  [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).
    : StringRef( rawChars, static_cast<StringRef::size_type>(std::strlen(rawChars) ) )

ANALYSIS SUMMARY:

Hits = 58
Lines analyzed = 21474 in approximately 0.47 seconds (46066 lines/second)
Physical Source Lines of Code (SLOC) = 15841
Hits@level = [0]   7 [1]  11 [2]  41 [3]   5 [4]   1 [5]   0
Hits@level+ = [0+]  65 [1+]  58 [2+]  47 [3+]   6 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 4.10328 [1+] 3.66139 [2+] 2.96698 [3+] 0.378764 [4+] 0.0631273 [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.