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/tinygltf-2.5.0+dfsg/loader_example.cc
Examining data/tinygltf-2.5.0+dfsg/tests/fuzzer/fuzz_gltf.cc
Examining data/tinygltf-2.5.0+dfsg/tests/tester.cc
Examining data/tinygltf-2.5.0+dfsg/tiny_gltf.cpp
Examining data/tinygltf-2.5.0+dfsg/tiny_gltf.h

FINAL RESULTS:

data/tinygltf-2.5.0+dfsg/tiny_gltf.h:285: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(binary_value_.data(), p, n);
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2088:12:  [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.
  unsigned char char_array_3[3];
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2089:12:  [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.
  unsigned char char_array_4[4];
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2133:12:  [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.
  unsigned char char_array_4[4], char_array_3[3];
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2548:7:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
      MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), nullptr, 0);
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2550:3:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  MultiByteToWideChar(CP_UTF8, 0, str.data(), (int)str.size(), &wstr[0],
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2599:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  FILE *fp = fopen(abs_filename.c_str(), "rb");
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:4095: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(&(buffer->data.at(0)), bin_data, static_cast<size_t>(byteLength));
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:4380: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(outBuffer.data(), &mesh->face(draco::FaceIndex(0))[0],
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:4390:9:  [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(outBuffer.data() + f.value() * faceStride, &indices[0],
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:4396:9:  [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(outBuffer.data() + f.value() * faceStride, &indices[0],
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:4415: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(outBuffer.data() + byteOffset, &values[0],
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:6220: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(&version, bytes + 4, 4);
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:6222: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(&length, bytes + 8, 4);
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:6224: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(&model_length, bytes + 12, 4);
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:6226: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(&model_format, bytes + 16, 4);
data/tinygltf-2.5.0+dfsg/tests/tester.cc:22:23:  [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).
  JsonParse(doc, str, strlen(str));
data/tinygltf-2.5.0+dfsg/tests/tester.cc:34:84:  [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 ret = ctx.LoadASCIIFromString(&model, &err, &warn, "bora", static_cast<int>(strlen("bora")), /* basedir*/ "");
data/tinygltf-2.5.0+dfsg/tiny_gltf.h:2735:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  f.read(reinterpret_cast<char *>(&out->at(0)),

ANALYSIS SUMMARY:

Hits = 19
Lines analyzed = 9115 in approximately 0.21 seconds (44161 lines/second)
Physical Source Lines of Code (SLOC) = 7275
Hits@level = [0]   4 [1]   3 [2]  16 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  23 [1+]  19 [2+]  16 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 3.16151 [1+] 2.61168 [2+] 2.19931 [3+]   0 [4+]   0 [5+]   0
Dot directories skipped = 2 (--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.