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/libcm256cc-1.0.5/cm256.cpp
Examining data/libcm256cc-1.0.5/cm256.h
Examining data/libcm256cc-1.0.5/cmake/test/test_arm_neon.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_avx.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_avx2.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_avx512.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_sse2.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_sse3.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_sse41.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_sse42.cxx
Examining data/libcm256cc-1.0.5/cmake/test/test_x86_ssse3.cxx
Examining data/libcm256cc-1.0.5/export.h
Examining data/libcm256cc-1.0.5/gf256.cpp
Examining data/libcm256cc-1.0.5/gf256.h
Examining data/libcm256cc-1.0.5/sse2neon.h
Examining data/libcm256cc-1.0.5/unit_test/UDPSocket.cpp
Examining data/libcm256cc-1.0.5/unit_test/UDPSocket.h
Examining data/libcm256cc-1.0.5/unit_test/cm256_test.cpp
Examining data/libcm256cc-1.0.5/unit_test/data.h
Examining data/libcm256cc-1.0.5/unit_test/example0.cpp
Examining data/libcm256cc-1.0.5/unit_test/example0.h
Examining data/libcm256cc-1.0.5/unit_test/example1.cpp
Examining data/libcm256cc-1.0.5/unit_test/example1.h
Examining data/libcm256cc-1.0.5/unit_test/mainutils.cpp
Examining data/libcm256cc-1.0.5/unit_test/mainutils.h
Examining data/libcm256cc-1.0.5/unit_test/receive.cpp
Examining data/libcm256cc-1.0.5/unit_test/transmit.cpp

FINAL RESULTS:

data/libcm256cc-1.0.5/unit_test/example1.cpp:50:10:  [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.
    std::srand(frameNumber);
data/libcm256cc-1.0.5/unit_test/example1.cpp:261:10:  [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.
    std::srand(m_frameHead);
data/libcm256cc-1.0.5/unit_test/receive.cpp:101:17:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt_long(argc, argv,
data/libcm256cc-1.0.5/unit_test/transmit.cpp:105:17:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((c = getopt_long(argc, argv,
data/libcm256cc-1.0.5/cm256.cpp:132: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(recoveryBlock, originals[0].Block, params.BlockBytes);
data/libcm256cc-1.0.5/unit_test/example0.cpp:49:12:  [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).
    rxFile.open(filename.c_str(), std::ios::in | std::ios::binary);
data/libcm256cc-1.0.5/unit_test/example0.cpp:136:13:  [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).
    refFile.open(refFilename.c_str(), std::ios::in | std::ios::binary);
data/libcm256cc-1.0.5/unit_test/example0.cpp:301:12:  [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).
    txFile.open(filename.c_str(), std::ios::out | std::ios::binary);
data/libcm256cc-1.0.5/unit_test/example0.cpp:315:13:  [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).
    refFile.open(refFilename.c_str(), std::ios::out | std::ios::binary);
data/libcm256cc-1.0.5/unit_test/example1.cpp:364: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(&rxBlock, rawBlock, sizeof(SuperBlock));
data/libcm256cc-1.0.5/unit_test/example0.cpp:53:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    rxFile.read((char *) &fileHeader, sizeof(FileHeader));
data/libcm256cc-1.0.5/unit_test/example0.cpp:66:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        rxFile.read((char *) &rxBuffer[i], sizeof(SuperBlock));
data/libcm256cc-1.0.5/unit_test/example0.cpp:140:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    refFile.read((char *) &refFileHeader, sizeof(FileHeader));
data/libcm256cc-1.0.5/unit_test/example0.cpp:144:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        refFile.read((char *) &refBuffer[i], sizeof(SuperBlock));
data/libcm256cc-1.0.5/unit_test/example1.cpp:126:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(txDelay);
data/libcm256cc-1.0.5/unit_test/example1.cpp:129:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(100*txDelay); // wait at end of frame to let Rx process it
data/libcm256cc-1.0.5/unit_test/example1.cpp:361:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(10);
data/libcm256cc-1.0.5/unit_test/receive.cpp:57: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).
    ssize_t r = write(STDERR_FILENO, s, strlen(s));
data/libcm256cc-1.0.5/unit_test/receive.cpp:59:24:  [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 (r != (ssize_t) strlen(s)) {
data/libcm256cc-1.0.5/unit_test/transmit.cpp:56: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).
    ssize_t r = write(STDERR_FILENO, s, strlen(s));
data/libcm256cc-1.0.5/unit_test/transmit.cpp:58:24:  [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 (r != (ssize_t) strlen(s)) {

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 5879 in approximately 0.19 seconds (31654 lines/second)
Physical Source Lines of Code (SLOC) = 3562
Hits@level = [0]  14 [1]  11 [2]   6 [3]   4 [4]   0 [5]   0
Hits@level+ = [0+]  35 [1+]  21 [2+]  10 [3+]   4 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 9.82594 [1+] 5.89556 [2+] 2.80741 [3+] 1.12296 [4+]   0 [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.