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/quorum-1.1.1/include/gzip_stream.hpp
Examining data/quorum-1.1.1/include/jflib/locks_pthread.hpp
Examining data/quorum-1.1.1/include/jflib/multiplexed_io.hpp
Examining data/quorum-1.1.1/include/jflib/pool.hpp
Examining data/quorum-1.1.1/include/misc.hpp
Examining data/quorum-1.1.1/src/create_database.cc
Examining data/quorum-1.1.1/src/err_log.cc
Examining data/quorum-1.1.1/src/err_log.hpp
Examining data/quorum-1.1.1/src/error_correct_reads.cc
Examining data/quorum-1.1.1/src/error_correct_reads.hpp
Examining data/quorum-1.1.1/src/histo_mer_database.cc
Examining data/quorum-1.1.1/src/kmer.hpp
Examining data/quorum-1.1.1/src/mer_database.hpp
Examining data/quorum-1.1.1/src/merge_mate_pairs.cc
Examining data/quorum-1.1.1/src/query_mer_database.cc
Examining data/quorum-1.1.1/src/split_mate_pairs.cc
Examining data/quorum-1.1.1/src/verbose_log.hpp
Examining data/quorum-1.1.1/unit_tests/gtest/gtest.h
Examining data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc
Examining data/quorum-1.1.1/unit_tests/gtest/src/gtest_main.cc
Examining data/quorum-1.1.1/unit_tests/test_mer_database.cc
Examining data/quorum-1.1.1/unit_tests/test_misc.hpp
Examining data/quorum-1.1.1/unit_tests/test_speed_calc.cc

FINAL RESULTS:

data/quorum-1.1.1/include/gzip_stream.hpp:31:15:  [4] (shell) popen:
  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.
    FILE *f = popen(command.c_str(), "w");
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2868:20:  [4] (buffer) StrNCpy:
  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).
inline const char* StrNCpy(char* dest, const char* src, size_t n) {
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2940:26:  [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.
# define GTEST_SNPRINTF_ _snprintf
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2942:26:  [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.
# define GTEST_SNPRINTF_ snprintf
data/quorum-1.1.1/unit_tests/gtest/gtest.h:8322:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(\
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:1623:10:  [4] (format) vsnprintf:
  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.
# define vsnprintf _vsnprintf
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:4119:5:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vprintf(fmt, args);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:4138:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(fmt, args);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:4145:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(fmt, args);
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2906:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char* const env = getenv(name);
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2909:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  return getenv(name);
data/quorum-1.1.1/unit_tests/gtest/gtest.h:18306:39:  [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.
  void ShuffleTests(internal::Random* random);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:712:37:  [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.
void ShuffleRange(internal::Random* random, int begin, int end,
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:733:39:  [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.
inline void Shuffle(internal::Random* random, std::vector<E>* v) {
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:734:16:  [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.
  ShuffleRange(random, 0, static_cast<int>(v->size()), v);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:1202:21:  [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.
  internal::Random* random() { return &random_; }
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:3947:47:  [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.
void TestCase::ShuffleTests(internal::Random* random) {
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:3948:11:  [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.
  Shuffle(random, &test_indices_);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:5777:7:  [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()->Reseed(random_seed_);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:6087:16:  [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.
  ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:6090:16:  [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.
  ShuffleRange(random(), last_death_test_case_ + 1,
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:6095:34:  [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.
    test_cases_[i]->ShuffleTests(random());
data/quorum-1.1.1/include/jflib/multiplexed_io.hpp:245: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(_overflow_buffer.base(), pptr() - extra, extra);
data/quorum-1.1.1/include/jflib/multiplexed_io.hpp:258: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(pbase(), _overflow_buffer.base(), _overflow_buffer.write_len());
data/quorum-1.1.1/src/mer_database.hpp:217: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).
    int fd = open(path, O_RDONLY);
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2880:10:  [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).
  return fopen(path, mode);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:2328:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(CP_ACP, 0, ansi, length,
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:2331:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(CP_ACP, 0, ansi, length,
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:2841: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 error_text[kBufSize] = { '\0' };
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:2925: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 str[5];  // Big enough for the largest valid code point.
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:6808: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 buffer[256];
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:7224: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 executable_path[_MAX_PATH + 1];  // NOLINT
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:7503: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).
  const int cwd_fd = open(".", O_RDONLY);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:7941: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:7944: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' };
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8321: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).
  const int fd = open("/proc/self/as", O_RDONLY);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8651: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(buffer, regex, len);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8728: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 temp_dir_path[MAX_PATH + 1] = { '\0' };  // NOLINT
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8729: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 temp_file_path[MAX_PATH + 1] = { '\0' };  // NOLINT
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8766:29:  [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).
    const int captured_fd = mkstemp(name_template);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:9074: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 text[5] = "";
data/quorum-1.1.1/src/mer_database.hpp:210:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ssize_t s = read(fd, base_ + sucked, buf.st_size - sucked);
data/quorum-1.1.1/src/mer_database.hpp:262:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if(!res.read(file))
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2869:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  return strncpy(dest, src, n);
data/quorum-1.1.1/unit_tests/gtest/gtest.h:2891:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return static_cast<int>(read(fd, buf, count));
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:2326: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).
  const int length = strlen(ansi);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:2986:34:  [1] (buffer) wcslen:
  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).
    num_chars = static_cast<int>(wcslen(str));
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:4740:32:  [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).
      segment = next_segment + strlen("]]>");
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:4905: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).
  result.reserve(strlen(str) + 1);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:6148:29:  [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).
  const size_t prefix_len = strlen(prefix);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8385:33:  [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).
  const size_t full_regex_len = strlen(regex) + 10;
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:8639: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).
  const size_t len = strlen(regex);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:9328:29:  [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).
    PrintCharsAsStringTo(s, strlen(s), os);
data/quorum-1.1.1/unit_tests/gtest/src/gtest-all.cc:9345:29:  [1] (buffer) wcslen:
  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).
    PrintCharsAsStringTo(s, wcslen(s), os);

ANALYSIS SUMMARY:

Hits = 54
Lines analyzed = 32624 in approximately 0.79 seconds (41229 lines/second)
Physical Source Lines of Code (SLOC) = 21395
Hits@level = [0]  55 [1]  13 [2]  19 [3]  13 [4]   9 [5]   0
Hits@level+ = [0+] 109 [1+]  54 [2+]  41 [3+]  22 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 5.09465 [1+] 2.52395 [2+] 1.91634 [3+] 1.02828 [4+] 0.420659 [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.