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/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc
Examining data/compreffor-0.5.0.post1/src/cxx/cffCompressor.h
Examining data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp

FINAL RESULTS:

data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:753:5:  [4] (buffer) strcpy:
  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).
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:741: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(rawTok + 1, data + csPos + 1, tokSize - 1);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:979: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 countBuffer[2];
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:1091:19:  [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).
      numRounds = atoi(argv[argIdx + 1]);
data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:706:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char ascii_chars[128];
data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:2892: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 ctversion[4], rtversion[4];
data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:2896:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char message[200];
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:87:19:  [1] (buffer) mismatch:
  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.
    auto p = std::mismatch(begin, end, other.begin);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:93:19:  [1] (buffer) mismatch:
  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.
    auto p = std::mismatch(other.begin, other.end, begin);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:830:21:  [1] (buffer) mismatch:
  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.
      auto p = std::mismatch(aFirst, aLast, bFirst);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:837:21:  [1] (buffer) mismatch:
  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.
      auto p = std::mismatch(bFirst, bLast, aFirst);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:980:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  instream.read(reinterpret_cast<char*>(countBuffer), 2);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:984:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  instream.read(reinterpret_cast<char*>(&offSize), 1);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:989:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  instream.read(reinterpret_cast<char*>(offsetBuffer), (count + 1) * offSize);
data/compreffor-0.5.0.post1/src/cxx/cffCompressor.cc:1006:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    instream.read(data, len);
data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:631:87:  [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).
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:751:52:  [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).
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
data/compreffor-0.5.0.post1/src/cython/_compreffor.cpp:2940: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).
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 4518 in approximately 0.17 seconds (27299 lines/second)
Physical Source Lines of Code (SLOC) = 3946
Hits@level = [0]   0 [1]  11 [2]   6 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  18 [1+]  18 [2+]   7 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 4.56158 [1+] 4.56158 [2+] 1.77395 [3+] 0.253421 [4+] 0.253421 [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.