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/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-actions.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-cardinalities.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-function-mocker.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-generated-actions.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-matchers.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-more-matchers.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-nice-strict.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock-spec-builders.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/gmock.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/internal/custom/gmock-generated-actions.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/internal/custom/gmock-matchers.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/internal/custom/gmock-port.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/internal/gmock-internal-utils.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/internal/gmock-port.h
Examining data/googletest-1.10.0.20201025/googlemock/include/gmock/internal/gmock-pp.h
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock-all.cc
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock-cardinalities.cc
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock-internal-utils.cc
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock-matchers.cc
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock-spec-builders.cc
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock.cc
Examining data/googletest-1.10.0.20201025/googlemock/src/gmock_main.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-actions_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-cardinalities_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-function-mocker_nc.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-function-mocker_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-generated-actions_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-internal-utils_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-matchers_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-more-actions_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-nice-strict_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-port_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-pp-string_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-pp_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock-spec-builders_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_all_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_ex_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_leak_test_.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_link2_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_link_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_link_test.h
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_output_test_.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_stress_test.cc
Examining data/googletest-1.10.0.20201025/googlemock/test/gmock_test.cc
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-death-test.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-matchers.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-message.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-param-test.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-printers.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-spi.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-test-part.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest-typed-test.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest_pred_impl.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/gtest_prod.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/custom/gtest-port.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/custom/gtest-printers.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/custom/gtest.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-death-test-internal.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-filepath.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-internal.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-param-util.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port-arch.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-string.h
Examining data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-type-util.h
Examining data/googletest-1.10.0.20201025/googletest/samples/prime_tables.h
Examining data/googletest-1.10.0.20201025/googletest/samples/sample1.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample1.h
Examining data/googletest-1.10.0.20201025/googletest/samples/sample10_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample1_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample2.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample2.h
Examining data/googletest-1.10.0.20201025/googletest/samples/sample2_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample3-inl.h
Examining data/googletest-1.10.0.20201025/googletest/samples/sample3_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample4.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample4.h
Examining data/googletest-1.10.0.20201025/googletest/samples/sample4_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample5_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample6_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample7_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample8_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/samples/sample9_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-all.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-death-test.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-filepath.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-internal-inl.h
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-matchers.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-port.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-printers.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-test-part.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest-typed-test.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest.cc
Examining data/googletest-1.10.0.20201025/googletest/src/gtest_main.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-break-on-failure-unittest_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-catch-exceptions-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-color-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-death-test-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-death-test_ex_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-env-var-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-failfast-unittest_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-filepath-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-filter-unittest_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-list-tests-unittest_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-listener-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-message-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-options-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-output-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-param-test-invalid-name1-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-param-test-invalid-name2-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-param-test-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-param-test-test.h
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-param-test2-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-port-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-printers-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-setuptestsuite-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-shuffle-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-test-part-test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-throw-on-failure-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/googletest-uninitialized-test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest-typed-test2_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest-typed-test_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest-typed-test_test.h
Examining data/googletest-1.10.0.20201025/googletest/test/gtest-unittest-api_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_all_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_assert_by_exception_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_environment_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_help_test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_list_output_unittest_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_main_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_no_test_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_pred_impl_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_premature_exit_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_prod_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_repeat_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_skip_in_environment_setup_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_skip_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_sole_header_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_stress_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_test_macro_stack_footprint_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_testbridge_test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_throw_on_failure_ex_test.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_xml_outfile1_test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_xml_outfile2_test_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/gtest_xml_output_unittest_.cc
Examining data/googletest-1.10.0.20201025/googletest/test/production.cc
Examining data/googletest-1.10.0.20201025/googletest/test/production.h

FINAL RESULTS:

data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-death-test-internal.h:194: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/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h:2125: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/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h:2127: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/googletest-1.10.0.20201025/googletest/src/gtest-death-test.cc:1256:3:  [4] (shell) execv:
  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.
  execv(args->argv[0], args->argv);
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:121: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:3285: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:3306: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:3313: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/googletest-1.10.0.20201025/googletest/test/googletest-death-test-test.cc:1364: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(stderr, InDeathTestChild() ? "Inside" : "Outside");
data/googletest-1.10.0.20201025/googletest/test/googletest-death-test-test.cc:1374: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(stderr, InDeathTestChild() ? "Inside" : "Outside");
data/googletest-1.10.0.20201025/googlemock/test/gmock-matchers_test.cc:6225:5:  [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.
    srand(static_cast<unsigned int>(seed));
data/googletest-1.10.0.20201025/googletest/include/gtest/gtest.h:1013: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/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h:2094: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/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h:2097: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/googletest-1.10.0.20201025/googletest/src/gtest-internal-inl.h:319: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/googletest-1.10.0.20201025/googletest/src/gtest-internal-inl.h:343: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/googletest-1.10.0.20201025/googletest/src/gtest-internal-inl.h:344: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/googletest-1.10.0.20201025/googletest/src/gtest-internal-inl.h:837: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:347:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
  ::InitializeCriticalSection(critical_section_);
data/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:362:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  ::EnterCriticalSection(critical_section_);
data/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:435:11:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        ::InitializeCriticalSection(critical_section_);
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:3072:48:  [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 TestSuite::ShuffleTests(internal::Random* random) {
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:3073: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:5686: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(static_cast<uint32_t>(random_seed_));
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:6052: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_suite_ + 1, &test_suite_indices_);
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:6055: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_suite_ + 1,
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:6060:30:  [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_suite->ShuffleTests(random());
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:444:9:  [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.
    if (getenv("TZ"))
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:445:26:  [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.
      saved_tz_ = strdup(getenv("TZ"));
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:783:29:  [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.
  testing::internal::Random random(42);
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:785: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.Generate(0),
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:788: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.Generate(testing::internal::Random::kMaxRange + 1),
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:795:29:  [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.
  testing::internal::Random random(12345);
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:797:15:  [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.
    EXPECT_LT(random.Generate(kRange), kRange) << " for iteration " << i;
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:812:29:  [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.
  testing::internal::Random random(kSeed);
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:814:17:  [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.
    values[i] = random.Generate(kRange);
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:817:3:  [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(kSeed);
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:819:26:  [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.
    EXPECT_EQ(values[i], random.Generate(kRange)) << " for iteration " << i;
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:884:29:  [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.
  testing::internal::Random random(1);
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:887: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.
      ShuffleRange(&random, -1, 1, &a),
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:890: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.
      ShuffleRange(&random, 4, 4, &a),
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:893: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.
      ShuffleRange(&random, 3, 2, &a),
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:896: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.
      ShuffleRange(&random, 3, 4, &a),
data/googletest-1.10.0.20201025/googlemock/test/gmock-internal-utils_test.cc:464: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).
  int skip_count = atoi(log.substr(expected_message.size()).c_str());
data/googletest-1.10.0.20201025/googlemock/test/gmock-more-actions_test.cc:645: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 ch[4] = {};
data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h:2065: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/googletest-1.10.0.20201025/googletest/samples/sample2.cc:42: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(clone, a_c_string, len + 1);
data/googletest-1.10.0.20201025/googletest/src/gtest-death-test.cc:349: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/googletest-1.10.0.20201025/googletest/src/gtest-death-test.cc:772: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/googletest-1.10.0.20201025/googletest/src/gtest-death-test.cc:1314: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/googletest-1.10.0.20201025/googletest/src/gtest-filepath.cc:101: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/googletest-1.10.0.20201025/googletest/src/gtest-filepath.cc:104: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:224: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:1008: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:1082: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:1083: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:1117: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/googletest-1.10.0.20201025/googletest/src/gtest-printers.cc:67: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:1020:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(CP_ACP, 0, ansi, length, nullptr, 0);
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:1022:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(CP_ACP, 0, ansi, length,
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:1849: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:1933: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:4838: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 tmp[1024];
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:4844: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 line[1024];
data/googletest-1.10.0.20201025/googletest/test/googletest-filepath-test.cc:358: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 current_drive[_MAX_PATH];  // NOLINT
data/googletest-1.10.0.20201025/googletest/test/googletest-filepath-test.cc:375:7:  [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 non_drive[_MAX_PATH];  // NOLINT
data/googletest-1.10.0.20201025/googletest/test/googletest-printers-test.cc:133:32:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  UnprintableInFoo() : z_(0) { memcpy(xy_, "\xEF\x12\x0\x0\x34\xAB\x0\x0", 8); }
data/googletest-1.10.0.20201025/googletest/test/googletest-printers-test.cc:136: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 xy_[8];
data/googletest-1.10.0.20201025/googletest/test/googletest-printers-test.cc:1198: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 array[257];
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:7425: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.
  const char a[3] = "hi";
data/googletest-1.10.0.20201025/googletest/test/gtest_unittest.cc:7509: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.
  const char a[2][3] = { "hi", "lo" };
data/googletest-1.10.0.20201025/googlemock/test/gmock-matchers_test.cc:4588:59:  [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 operator()(const char* s) { return static_cast<int>(strlen(s)); }
data/googletest-1.10.0.20201025/googlemock/test/gmock-matchers_test.cc:7281: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).
    nested.emplace_back(s, s + strlen(s));
data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-port.h:2077: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/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-type-util.h:57: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).
  if (s.compare(0, strlen(prefix), prefix) == 0) {
data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-type-util.h:58:47:  [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).
    std::string::size_type end = s.find("::", strlen(prefix));
data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-type-util.h:61: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).
      s.erase(strlen("std"), end - strlen("std"));
data/googletest-1.10.0.20201025/googletest/include/gtest/internal/gtest-type-util.h:61:36:  [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.erase(strlen("std"), end - strlen("std"));
data/googletest-1.10.0.20201025/googletest/samples/sample2.cc:40: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(a_c_string);
data/googletest-1.10.0.20201025/googletest/samples/sample2.h:74:61:  [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).
  size_t Length() const { return c_string_ == nullptr ? 0 : strlen(c_string_); }
data/googletest-1.10.0.20201025/googletest/src/gtest-death-test.cc:935:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          status_zx = stderr_socket_.read(
data/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:746: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/googletest-1.10.0.20201025/googletest/src/gtest-port.cc:996: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/googletest-1.10.0.20201025/googletest/src/gtest-printers.cc:339: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/googletest-1.10.0.20201025/googletest/src/gtest-printers.cc:356: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);
data/googletest-1.10.0.20201025/googletest/src/gtest.cc:1018: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:1997: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:4116: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:4742: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:6113: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/googletest-1.10.0.20201025/googletest/src/gtest.cc:6564: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).
  else if (temp_dir[strlen(temp_dir) - 1] == '\\')
data/googletest-1.10.0.20201025/googletest/test/googletest-printers-test.cc:1006:20:  [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.
  EXPECT_TRUE(std::equal(a, a + kSize, numbers.begin()));

ANALYSIS SUMMARY:

Hits = 92
Lines analyzed = 82809 in approximately 1.91 seconds (43420 lines/second)
Physical Source Lines of Code (SLOC) = 51136
Hits@level = [0] 190 [1]  21 [2]  28 [3]  33 [4]  10 [5]   0
Hits@level+ = [0+] 282 [1+]  92 [2+]  71 [3+]  43 [4+]  10 [5+]   0
Hits/KSLOC@level+ = [0+] 5.51471 [1+] 1.79912 [2+] 1.38845 [3+] 0.840895 [4+] 0.195557 [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.