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/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/android/jni/main.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/conan/test_package/test_package.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/samples/greeter/client.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/samples/greeter/server.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/config.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/cpp_generator.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/cpp_generator.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/go_generator.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/go_generator.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/java_generator.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/java_generator.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/python_generator.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/python_generator.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/python_private_generator.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/schema_interface.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/swift_generator.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/src/compiler/swift_generator.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/tests/grpctest.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/grpc/tests/message_builder_test.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/base.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/code_generators.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatc.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/grpc.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/hash.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/idl.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/minireflect.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/pch/flatc_pch.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/pch/pch.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/reflection.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/reflection_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/registry.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/stl_emulation.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/util.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/android/jni/main.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/monster_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/sample_bfbs.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/sample_binary.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/sample_text.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/code_generators.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/flatc.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/flatc_main.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/flathash.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_cpp.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_csharp.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_dart.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_fbs.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_go.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_grpc.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_java.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_js_ts.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_json_schema.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_kotlin.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_lobster.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_lua.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_php.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_python.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_rust.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_swift.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_text.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/reflection.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/util.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/arrays_test_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/generated_cpp17/monster_test_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/test_cpp17.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/evolution_test/evolution_v1_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/evolution_test/evolution_v2_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/fuzzer/flatbuffers_parser_fuzzer.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/fuzzer/flatbuffers_scalar_fuzzer.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/fuzzer/flatbuffers_verifier_fuzzer.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/fuzzer/fuzzer_assert.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/fuzzer/scalar_debug.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/fuzzer/test_init.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_extra_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test.grpc.fb.cc
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test.grpc.fb.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_bfbs_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/namespace_test/namespace_test1_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/namespace_test/namespace_test2_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/native_type_test_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/native_type_test_impl.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/native_type_test_impl.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test_assert.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test_assert.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test_builder.cpp
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test_builder.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/union_vector/union_vector_generated.h
Examining data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp

FINAL RESULTS:

data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/util.h:105:3:  [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.
  snprintf(const_cast<char *>(s.data()), (s.size() + 1), fmt, string_width, t);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test_assert.h:16:12:  [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.
      do { printf(__VA_ARGS__); printf("\n"); } while(!IsConstTrue(true))
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/util.cpp:200:29:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
      char *abs_path_temp = realpath(filepath.c_str(), nullptr);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/util.cpp:255:23:  [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.
  auto env_str = std::getenv(var_name);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:628:5:  [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(new_p + new_size - in_use_back, old_p + old_size - in_use_back,
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:630:5:  [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(new_p, old_p, in_use_front);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:958:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    if (num > 0) { memcpy(make_space(num), bytes, num); }
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:723:5:  [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(const_cast<char *>(s.c_str()), str, len);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:743:7:  [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(const_cast<uint8_t *>(dest), &t, byte_width);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/reflection_generated.h:86: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 const char * const names[20] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/util.h:138: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 buf[21];  // (log((1 << 63) - 1) / log(10)) + 2
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/util.h:145: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 buf[22];  // (log((1 << 63) - 1) / log(10)) + 1
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/monster_generated.h:53: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 const char * const names[4] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/samples/monster_generated.h:84: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 const char * const names[3] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_cpp.cpp:2180:37:  [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).
    const int align = force_align ? atoi(force_align->constant.c_str()) : 1;
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:188:23:  [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).
  *val = Offset<void>(atoi(s));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:889:17:  [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).
      auto id = atoi(attr->constant.c_str());
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:1325:41:  [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).
      force_align ? static_cast<size_t>(atoi(force_align->constant.c_str()))
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:2282:15:  [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).
  auto a_id = atoi(a->attributes.Lookup("id")->constant.c_str());
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:2283:15:  [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).
  auto b_id = atoi(b->attributes.Lookup("id")->constant.c_str());
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:2306:40:  [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).
      auto align = static_cast<size_t>(atoi(force_align->constant.c_str()));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:2337:18:  [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).
        if (i != atoi(fields[i]->attributes.Lookup("id")->constant.c_str()))
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/reflection.cpp:324: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(vector_data(*flatbuf) + start, val.c_str(), val.size() + 1);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/util.cpp:197: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 abs_path[MAX_PATH];
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/arrays_test_generated.h:51: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 const char * const names[4] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/generated_cpp17/monster_test_generated.h:103: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 const char * const names[9] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/generated_cpp17/monster_test_generated.h:143: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/generated_cpp17/monster_test_generated.h:179: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/generated_cpp17/monster_test_generated.h:292: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/cpp17/generated_cpp17/monster_test_generated.h:405: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/evolution_test/evolution_v1_generated.h:39: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 const char * const names[3] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/evolution_test/evolution_v1_generated.h:71: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 const char * const names[4] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/evolution_test/evolution_v2_generated.h:46: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/evolution_test/evolution_v2_generated.h:82: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_generated.h:131: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 const char * const names[9] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_generated.h:171: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_generated.h:207: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_generated.h:349: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/monster_test_generated.h:491: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 const char * const names[5] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/namespace_test/namespace_test1_generated.h:45: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 const char * const names[4] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp:245:10:  [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(&test_buff[0], flatbuf, length);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp:246:10:  [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(&test_buff[length], flatbuf, length);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp:678:8:  [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(&b, &v, sizeof(T));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp:3276: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 non_zero_memory[arr_size];
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/union_vector/union_vector_generated.h:64: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 const char * const names[8] = {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:1473:30:  [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).
    return CreateString(str, strlen(str));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:1480:30:  [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).
    return CreateString(str, strlen(str));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:1547: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).
    return CreateSharedString(str, strlen(str));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flatbuffers.h:2018:26:  [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).
      FLATBUFFERS_ASSERT(strlen(file_identifier) == kFileIdentifierLength);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:527: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).
                    strlen(reinterpret_cast<const char *>(key)));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:555:40:  [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).
        flatbuffers::EscapeString(str, strlen(str), &s, true, false);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:726:65:  [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).
  bool MutateString(const char *str) { return MutateString(str, strlen(str)); }
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:1019:49:  [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 Key(const char *str) { return Key(str, strlen(str)); }
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/include/flatbuffers/flexbuffers.h:1040:55:  [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 String(const char *str) { return String(str, strlen(str)); }
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/flatc.cpp:455: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).
          contents.length() != strlen(contents.c_str())) {
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_cpp.cpp:838:41:  [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).
    return name.substr(0, name.size() - strlen(UnionTypeFieldSuffix()));
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_gen_dart.cpp:476:14:  [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.
    if (std::equal(root_namespace->components.begin(),
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/idl_parser.cpp:2222:14:  [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).
  auto len = strlen(suffix);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/src/util.cpp:65:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ifs.read(&(*buf)[0], (*buf).size());
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp:346:13:  [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).
    TEST_EQ(strlen(it->name()->c_str()) >= 4, true);
data/flatbuffers-1.12.1~git20200711.33e2d80+dfsg1/tests/test.cpp:1277:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  TEST_EQ(read, val);

ANALYSIS SUMMARY:

Hits = 61
Lines analyzed = 60106 in approximately 1.90 seconds (31609 lines/second)
Physical Source Lines of Code (SLOC) = 49124
Hits@level = [0]  34 [1]  16 [2]  41 [3]   2 [4]   2 [5]   0
Hits@level+ = [0+]  95 [1+]  61 [2+]  45 [3+]   4 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 1.93388 [1+] 1.24176 [2+] 0.916049 [3+] 0.0814266 [4+] 0.0407133 [5+]   0
Dot directories skipped = 5 (--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.