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/lz4-1.9.2/contrib/gen_manual/gen_manual.cpp
Examining data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c
Examining data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c
Examining data/lz4-1.9.2/examples/blockStreaming_lineByLine.c
Examining data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c
Examining data/lz4-1.9.2/examples/compress_functions.c
Examining data/lz4-1.9.2/examples/dictionaryRandomAccess.c
Examining data/lz4-1.9.2/examples/frameCompress.c
Examining data/lz4-1.9.2/examples/printVersion.c
Examining data/lz4-1.9.2/examples/simple_buffer.c
Examining data/lz4-1.9.2/lib/lz4.c
Examining data/lz4-1.9.2/lib/lz4.h
Examining data/lz4-1.9.2/lib/lz4frame.c
Examining data/lz4-1.9.2/lib/lz4frame.h
Examining data/lz4-1.9.2/lib/lz4frame_static.h
Examining data/lz4-1.9.2/lib/lz4hc.c
Examining data/lz4-1.9.2/lib/lz4hc.h
Examining data/lz4-1.9.2/lib/xxhash.c
Examining data/lz4-1.9.2/lib/xxhash.h
Examining data/lz4-1.9.2/ossfuzz/compress_frame_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/compress_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/compress_hc_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/decompress_frame_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/decompress_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/fuzz.h
Examining data/lz4-1.9.2/ossfuzz/fuzz_helpers.h
Examining data/lz4-1.9.2/ossfuzz/lz4_helpers.c
Examining data/lz4-1.9.2/ossfuzz/lz4_helpers.h
Examining data/lz4-1.9.2/ossfuzz/round_trip_frame_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/round_trip_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/round_trip_hc_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/round_trip_stream_fuzzer.c
Examining data/lz4-1.9.2/ossfuzz/standaloneengine.c
Examining data/lz4-1.9.2/programs/bench.c
Examining data/lz4-1.9.2/programs/bench.h
Examining data/lz4-1.9.2/programs/datagen.c
Examining data/lz4-1.9.2/programs/datagen.h
Examining data/lz4-1.9.2/programs/lz4cli.c
Examining data/lz4-1.9.2/programs/lz4io.c
Examining data/lz4-1.9.2/programs/lz4io.h
Examining data/lz4-1.9.2/programs/platform.h
Examining data/lz4-1.9.2/programs/util.h
Examining data/lz4-1.9.2/tests/checkFrame.c
Examining data/lz4-1.9.2/tests/checkTag.c
Examining data/lz4-1.9.2/tests/datagencli.c
Examining data/lz4-1.9.2/tests/frametest.c
Examining data/lz4-1.9.2/tests/fullbench.c
Examining data/lz4-1.9.2/tests/fuzzer.c
Examining data/lz4-1.9.2/tests/roundTripTest.c

FINAL RESULTS:

data/lz4-1.9.2/programs/util.h:277:13:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    #define chmod _chmod
data/lz4-1.9.2/programs/util.h:300:12:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
    res += chown(filename, statbuf->st_uid, statbuf->st_gid);  /* Copy ownership */
data/lz4-1.9.2/programs/util.h:303:12:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    res += chmod(filename, statbuf->st_mode & 07777);  /* Copy file permissions */
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:10:11:  [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 snprintf sprintf_s
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:7:11:  [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 snprintf sprintf_s
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:7:11:  [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 snprintf sprintf_s
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:10:11:  [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 snprintf sprintf_s
data/lz4-1.9.2/examples/compress_functions.c:344:3:  [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.
  printf(header_format, "Source", "Function Benchmarked", "Total Seconds", "Iterations/sec", "ns/Iteration", "% of default");
data/lz4-1.9.2/examples/compress_functions.c:346:3:  [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.
  printf(format, "Normal Text", "LZ4_compress_default()",       (double)time_taken__default       / BILLION, (int)(iterations / ((double)time_taken__default       /BILLION)), (int)time_taken__default       / iterations, (double)time_taken__default       * 100 / time_taken__default);
data/lz4-1.9.2/examples/compress_functions.c:347:3:  [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.
  printf(format, "Normal Text", "LZ4_compress_fast()",          (double)time_taken__fast          / BILLION, (int)(iterations / ((double)time_taken__fast          /BILLION)), (int)time_taken__fast          / iterations, (double)time_taken__fast          * 100 / time_taken__default);
data/lz4-1.9.2/examples/compress_functions.c:348:3:  [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.
  printf(format, "Normal Text", "LZ4_compress_fast_extState()", (double)time_taken__fast_extstate / BILLION, (int)(iterations / ((double)time_taken__fast_extstate /BILLION)), (int)time_taken__fast_extstate / iterations, (double)time_taken__fast_extstate * 100 / time_taken__default);
data/lz4-1.9.2/examples/compress_functions.c:350:3:  [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.
  printf(format, "Normal Text", "LZ4_decompress_safe()",        (double)time_taken__decomp_safe   / BILLION, (int)(iterations / ((double)time_taken__decomp_safe   /BILLION)), (int)time_taken__decomp_safe   / iterations, (double)time_taken__decomp_safe   * 100 / time_taken__default);
data/lz4-1.9.2/examples/compress_functions.c:351:3:  [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.
  printf(format, "Normal Text", "LZ4_decompress_fast()",        (double)time_taken__decomp_fast   / BILLION, (int)(iterations / ((double)time_taken__decomp_fast   /BILLION)), (int)time_taken__decomp_fast   / iterations, (double)time_taken__decomp_fast   * 100 / time_taken__default);
data/lz4-1.9.2/examples/compress_functions.c:352:3:  [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.
  printf(header_format, "", "", "", "", "", "");
data/lz4-1.9.2/examples/compress_functions.c:353:3:  [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.
  printf(format, "Compressible", "LZ4_compress_default()",       (double)time_taken_hc__default       / BILLION, (int)(iterations / ((double)time_taken_hc__default       /BILLION)), (int)time_taken_hc__default       / iterations, (double)time_taken_hc__default       * 100 / time_taken_hc__default);
data/lz4-1.9.2/examples/compress_functions.c:354:3:  [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.
  printf(format, "Compressible", "LZ4_compress_fast()",          (double)time_taken_hc__fast          / BILLION, (int)(iterations / ((double)time_taken_hc__fast          /BILLION)), (int)time_taken_hc__fast          / iterations, (double)time_taken_hc__fast          * 100 / time_taken_hc__default);
data/lz4-1.9.2/examples/compress_functions.c:355:3:  [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.
  printf(format, "Compressible", "LZ4_compress_fast_extState()", (double)time_taken_hc__fast_extstate / BILLION, (int)(iterations / ((double)time_taken_hc__fast_extstate /BILLION)), (int)time_taken_hc__fast_extstate / iterations, (double)time_taken_hc__fast_extstate * 100 / time_taken_hc__default);
data/lz4-1.9.2/examples/compress_functions.c:357:3:  [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.
  printf(format, "Compressible", "LZ4_decompress_safe()",        (double)time_taken_hc__decomp_safe   / BILLION, (int)(iterations / ((double)time_taken_hc__decomp_safe   /BILLION)), (int)time_taken_hc__decomp_safe   / iterations, (double)time_taken_hc__decomp_safe   * 100 / time_taken_hc__default);
data/lz4-1.9.2/examples/compress_functions.c:358:3:  [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.
  printf(format, "Compressible", "LZ4_decompress_fast()",        (double)time_taken_hc__decomp_fast   / BILLION, (int)(iterations / ((double)time_taken_hc__decomp_fast   /BILLION)), (int)time_taken_hc__decomp_fast   / iterations, (double)time_taken_hc__decomp_fast   * 100 / time_taken_hc__default);
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:5:11:  [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 snprintf sprintf_s
data/lz4-1.9.2/lib/lz4.c:231:21:  [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, __FILE__ ": ");           \
data/lz4-1.9.2/lib/lz4.c:232:21:  [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, __VA_ARGS__);             \
data/lz4-1.9.2/lib/lz4frame.c:118:21:  [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, __FILE__ ": ");           \
data/lz4-1.9.2/lib/lz4frame.c:119:21:  [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, __VA_ARGS__);             \
data/lz4-1.9.2/programs/bench.c:90:30:  [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.
#define DISPLAY(...)         fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/programs/lz4cli.c:70:32:  [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.
#define DISPLAYOUT(...)        fprintf(stdout, __VA_ARGS__)
data/lz4-1.9.2/programs/lz4cli.c:71:32:  [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.
#define DISPLAY(...)           fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/programs/lz4cli.c:685:13:  [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(dynNameSpace, input_filename);
data/lz4-1.9.2/programs/lz4cli.c:686:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(dynNameSpace, LZ4_EXTENSION);
data/lz4-1.9.2/programs/lz4cli.c:696:13:  [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(dynNameSpace, input_filename);
data/lz4-1.9.2/programs/lz4io.c:92:30:  [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.
#define DISPLAY(...)         fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/programs/lz4io.c:784:9:  [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(dstFileName, inFileNamesTable[i]);
data/lz4-1.9.2/programs/lz4io.c:785:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(dstFileName, suffix);
data/lz4-1.9.2/programs/platform.h:36:13:  [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 snprintf sprintf_s       /* snprintf unsupported by Visual <= 2013 */
data/lz4-1.9.2/tests/checkFrame.c:65:33:  [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.
  #define DISPLAY(...)          fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/tests/datagencli.c:51:30:  [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.
#define DISPLAY(...)         fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/tests/frametest.c:84:31:  [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.
#define DISPLAY(...)          fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/tests/fullbench.c:91:22:  [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.
#define DISPLAY(...) fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/tests/fuzzer.c:94:30:  [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.
#define DISPLAY(...)         fprintf(stdout, __VA_ARGS__)
data/lz4-1.9.2/tests/fuzzer.c:339:35:  [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.
    printf("Test %u : ", testNb); printf(__VA_ARGS__); \
data/lz4-1.9.2/tests/fuzzer.c:350:21:  [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.
                    printf(" " __VA_ARGS__);      \
data/lz4-1.9.2/tests/roundTripTest.c:50:21:  [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.
#define MSG(...)    fprintf(stderr, __VA_ARGS__)
data/lz4-1.9.2/ossfuzz/fuzz_helpers.h:87:19:  [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.
    return min + (random % (max - min + 1));
data/lz4-1.9.2/contrib/gen_manual/gen_manual.cpp:124: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).
    istream.open(argv[2], ifstream::in);
data/lz4-1.9.2/contrib/gen_manual/gen_manual.cpp:130: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).
    ostream.open(argv[3], ifstream::out);
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:62: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.
    static char inpBuf[RING_BUFFER_BYTES];
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:73:13:  [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 cmpBuf[CMPBUFSIZE];
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:94: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.
    static char decBuf[DEC_BUFFER_BYTES];
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:101: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 cmpBuf[CMPBUFSIZE];
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:138: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 b0[65536];
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:139: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 b1[65536];
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:168: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 inpFilename[256] = { 0 };
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:169: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 lz4Filename[256] = { 0 };
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:170: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 decFilename[256] = { 0 };
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:191:29:  [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* const inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:192:29:  [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* const outFp = fopen(lz4Filename, "wb");
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:201:29:  [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* const inpFp = fopen(lz4Filename, "rb");
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:202:29:  [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* const outFp = fopen(decFilename, "wb");
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:211:29:  [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* const inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:212:29:  [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* const decFp = fopen(decFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:44: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 inpBuf[2][BLOCK_BYTES];
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:57:13:  [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 cmpBuf[LZ4_COMPRESSBOUND(BLOCK_BYTES)];
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:79: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 decBuf[2][BLOCK_BYTES];
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:85: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 cmpBuf[LZ4_COMPRESSBOUND(BLOCK_BYTES)];
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:120: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 b0[65536];
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:121: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 b1[65536];
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:141: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 inpFilename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:142: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 lz4Filename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:143: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 decFilename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:160:23:  [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* inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:161:23:  [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* outFp = fopen(lz4Filename, "wb");
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:173:23:  [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* inpFp = fopen(lz4Filename, "rb");
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:174:23:  [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* outFp = fopen(decFilename, "wb");
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:186:23:  [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* inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_doubleBuffer.c:187:23:  [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* decFp = fopen(decFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:155: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 inpFilename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:156: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 lz4Filename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:157: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 decFilename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:175:23:  [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* inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:176:23:  [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* outFp = fopen(lz4Filename, "wb");
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:186:23:  [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* inpFp = fopen(lz4Filename, "rb");
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:187:23:  [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* outFp = fopen(decFilename, "wb");
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:197:23:  [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* inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:198:23:  [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* decFp = fopen(decFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:53: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.
    static char inpBuf[RING_BUFFER_BYTES];
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:65:13:  [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 cmpBuf[CMPBUFSIZE];
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:84: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.
    static char decBuf[DECODE_RING_BUFFER];
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:91: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 cmpBuf[CMPBUFSIZE];
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:119: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 b0[65536];
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:120: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 b1[65536];
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:137: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 inpFilename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:138: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 lz4Filename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:139: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 decFilename[256] = { 0 };
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:155:29:  [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* const inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:156:29:  [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* const outFp = fopen(lz4Filename, "wb");
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:165:29:  [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* const inpFp = fopen(lz4Filename, "rb");
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:166:29:  [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* const outFp = fopen(decFilename, "wb");
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:175:29:  [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* const inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/blockStreaming_ringBuffer.c:176:29:  [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* const decFp = fopen(decFilename, "rb");
data/lz4-1.9.2/examples/compress_functions.c:240: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).
    iterations = atoi(argv[1]);
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:61: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 inpBuf[BLOCK_BYTES];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:83:13:  [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 cmpBuf[LZ4_COMPRESSBOUND(BLOCK_BYTES)];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:114: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 decBuf[BLOCK_BYTES];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:122: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 magic[sizeof(kTestMagic)];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:147: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 cmpBuf[LZ4_COMPRESSBOUND(BLOCK_BYTES)];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:178: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 b0[4096];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:179: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 b1[4096];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:200: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 inpFilename[256] = { 0 };
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:201: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 lz4Filename[256] = { 0 };
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:202: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 decFilename[256] = { 0 };
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:203: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 dictFilename[256] = { 0 };
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:206: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 dict[DICTIONARY_BYTES];
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:218:14:  [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).
    offset = atoi(argv[3]);
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:219:14:  [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).
    length = atoi(argv[4]);
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:230:24:  [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* dictFp = fopen(dictFilename, "rb");
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:237:23:  [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* inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:238:23:  [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* outFp = fopen(lz4Filename, "wb");
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:250:23:  [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* inpFp = fopen(lz4Filename, "rb");
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:251:23:  [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* outFp = fopen(decFilename, "wb");
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:263:23:  [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* inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:264:23:  [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* decFp = fopen(decFilename, "rb");
data/lz4-1.9.2/examples/frameCompress.c:313: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 b0[1024];
data/lz4-1.9.2/examples/frameCompress.c:314: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 b1[1024];
data/lz4-1.9.2/examples/frameCompress.c:328: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 inpFilename[256] = { 0 };
data/lz4-1.9.2/examples/frameCompress.c:329: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 lz4Filename[256] = { 0 };
data/lz4-1.9.2/examples/frameCompress.c:330: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 decFilename[256] = { 0 };
data/lz4-1.9.2/examples/frameCompress.c:346:29:  [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* const inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/frameCompress.c:347:29:  [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* const outFp = fopen(lz4Filename, "wb");
data/lz4-1.9.2/examples/frameCompress.c:367:29:  [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* const inpFp = fopen(lz4Filename, "rb");
data/lz4-1.9.2/examples/frameCompress.c:368:29:  [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* const outFp = fopen(decFilename, "wb");
data/lz4-1.9.2/examples/frameCompress.c:384:29:  [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* const inpFp = fopen(inpFilename, "rb");
data/lz4-1.9.2/examples/frameCompress.c:385:29:  [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* const decFp = fopen(decFilename, "rb");
data/lz4-1.9.2/lib/lz4.c:325: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(memPtr, &value, sizeof(value));
data/lz4-1.9.2/lib/lz4.c:330: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(memPtr, &value, sizeof(value));
data/lz4-1.9.2/lib/lz4.c:365: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.
    do { memcpy(d,s,8); d+=8; s+=8; } while (d<e);
data/lz4-1.9.2/lib/lz4.c:396: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(dstPtr+4, srcPtr, 4);
data/lz4-1.9.2/lib/lz4.c:400: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(dstPtr, srcPtr, 8);
data/lz4-1.9.2/lib/lz4.c:418: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.
    do { memcpy(d,s,16); memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e);
data/lz4-1.9.2/lib/lz4.c:418:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    do { memcpy(d,s,16); memcpy(d+16,s+16,16); d+=32; s+=32; } while (d<e);
data/lz4-1.9.2/lib/lz4.c:437: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(v, srcPtr, 2);
data/lz4-1.9.2/lib/lz4.c:438: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(&v[2], srcPtr, 2);
data/lz4-1.9.2/lib/lz4.c:439: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(&v[4], &v[0], 4);
data/lz4-1.9.2/lib/lz4.c:442: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(v, srcPtr, 4);
data/lz4-1.9.2/lib/lz4.c:443: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(&v[4], srcPtr, 4);
data/lz4-1.9.2/lib/lz4.c:450: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(dstPtr, v, 8);
data/lz4-1.9.2/lib/lz4.c:453: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(dstPtr, v, 8);
data/lz4-1.9.2/lib/lz4.c:1165: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(op, anchor, lastRun);
data/lz4-1.9.2/lib/lz4.c:1541:17:  [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(streamPtr, streamPtr->dictCtx, sizeof(LZ4_stream_t));
data/lz4-1.9.2/lib/lz4.c:1749:21:  [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(op, ip, 16);
data/lz4-1.9.2/lib/lz4.c:1753:21:  [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(op, ip, 8);
data/lz4-1.9.2/lib/lz4.c:1754:39:  [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 (length > 8) { memcpy(op+8, ip+8, 8); }
data/lz4-1.9.2/lib/lz4.c:1790:25:  [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(op, match, 8);
data/lz4-1.9.2/lib/lz4.c:1791:25:  [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(op+8, match+8, 8);
data/lz4-1.9.2/lib/lz4.c:1792:25:  [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(op+16, match+16, 2);
data/lz4-1.9.2/lib/lz4.c:1815:21:  [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(op, dictEnd - copySize, copySize);
data/lz4-1.9.2/lib/lz4.c:1822:25:  [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(op, lowPrefix, restSize);
data/lz4-1.9.2/lib/lz4.c:1863:17:  [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(op, ip, endOnInput ? 16 : 8);
data/lz4-1.9.2/lib/lz4.c:1878:21:  [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(op + 0, match + 0, 8);
data/lz4-1.9.2/lib/lz4.c:1879:21:  [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(op + 8, match + 8, 8);
data/lz4-1.9.2/lib/lz4.c:1880:21:  [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(op +16, match +16, 2);
data/lz4-1.9.2/lib/lz4.c:1993:21:  [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(op, dictEnd - copySize, copySize);
data/lz4-1.9.2/lib/lz4.c:2000:25:  [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(op, lowPrefix, restSize);
data/lz4-1.9.2/lib/lz4.c:2019:21:  [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(op, match, mlen);
data/lz4-1.9.2/lib/lz4.c:2033:17:  [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(op+4, match, 4);
data/lz4-1.9.2/lib/lz4.c:2036:17:  [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(op, match, 8);
data/lz4-1.9.2/lib/lz4.c:2051:17:  [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(op, match, 8);
data/lz4-1.9.2/lib/lz4frame.c:507: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(cdict->dictContent, dictStart, dictSize);
data/lz4-1.9.2/lib/lz4frame.c:752: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(cSizePtr+BHSize, src, srcSize);
data/lz4-1.9.2/lib/lz4frame.c:850:13:  [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(cctxPtr->tmpIn + cctxPtr->tmpInSize, srcBuffer, srcSize);
data/lz4-1.9.2/lib/lz4frame.c:857:13:  [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(cctxPtr->tmpIn + cctxPtr->tmpInSize, srcBuffer, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:916: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(cctxPtr->tmpIn, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1159:13:  [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(dctx->header, srcPtr, srcSize);
data/lz4-1.9.2/lib/lz4frame.c:1323: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(dctx->tmpOutBuffer + preserveSize - copySize, oldDictEnd - copySize, copySize);
data/lz4-1.9.2/lib/lz4frame.c:1333:13:  [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(dctx->tmpOutBuffer, dctx->dict + dctx->dictSize - preserveSize, preserveSize);
data/lz4-1.9.2/lib/lz4frame.c:1336: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(dctx->tmpOutBuffer + dctx->dictSize, dstPtr, dstSize);
data/lz4-1.9.2/lib/lz4frame.c:1344: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(dctx->tmpOutBuffer, dctx->dict + dctx->dictSize - preserveSize, preserveSize);
data/lz4-1.9.2/lib/lz4frame.c:1345: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(dctx->tmpOutBuffer + preserveSize, dstPtr, dstSize);
data/lz4-1.9.2/lib/lz4frame.c:1415:17:  [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(dctx->header + dctx->tmpInSize, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1470:17:  [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(dctx->tmpIn + dctx->tmpInSize, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1513:17:  [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(dstPtr, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1553:21:  [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(dctx->header + dctx->tmpInSize, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1590:17:  [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(dctx->tmpIn + dctx->tmpInSize, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1652:25:  [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(dctx->tmpOutBuffer, dctx->dict + dctx->dictSize - 64 KB, 64 KB);
data/lz4-1.9.2/lib/lz4frame.c:1688:17:  [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(dstPtr, dctx->tmpOut + dctx->tmpOutStart, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1729:17:  [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(dctx->tmpIn + dctx->tmpInSize, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1771:17:  [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(dctx->header + dctx->tmpInSize, srcPtr, sizeToCopy);
data/lz4-1.9.2/lib/lz4frame.c:1820:17:  [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(dctx->tmpOutBuffer + preserveSize - copySize, oldDictEnd - copySize, copySize);
data/lz4-1.9.2/lib/lz4frame.c:1829:17:  [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(dctx->tmpOutBuffer, oldDictEnd - newDictSize, newDictSize);
data/lz4-1.9.2/lib/lz4hc.c:732: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(op, anchor, lastRunSize);
data/lz4-1.9.2/lib/lz4hc.c:854: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(ctx, ctx->dictCtx, sizeof(LZ4HC_CCtx_internal));
data/lz4-1.9.2/lib/lz4hc.c:1524: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.
         memcpy(op, anchor, lastRunSize);
data/lz4-1.9.2/lib/xxhash.c:112:76:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
static void* XXH_memcpy(void* dest, const void* src, size_t size) { return memcpy(dest,src,size); }
data/lz4-1.9.2/lib/xxhash.c:434: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(dstState, srcState, sizeof(*dstState));
data/lz4-1.9.2/lib/xxhash.c:446: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(statePtr, &state, sizeof(state) - sizeof(state.reserved));
data/lz4-1.9.2/lib/xxhash.c:569: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(dst, &hash, sizeof(*dst));
data/lz4-1.9.2/lib/xxhash.c:895: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(dstState, srcState, sizeof(*dstState));
data/lz4-1.9.2/lib/xxhash.c:907: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(statePtr, &state, sizeof(state) - sizeof(state.reserved));
data/lz4-1.9.2/lib/xxhash.c:1022: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(dst, &hash, sizeof(*dst));
data/lz4-1.9.2/lib/xxhash.h:204:27:  [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.
typedef struct { unsigned char digest[4]; } XXH32_canonical_t;
data/lz4-1.9.2/lib/xxhash.h:239:27:  [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.
typedef struct { unsigned char digest[8]; } XXH64_canonical_t;
data/lz4-1.9.2/ossfuzz/decompress_fuzzer.c:33: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(dataAfterDict, data, size);
data/lz4-1.9.2/ossfuzz/round_trip_stream_fuzzer.c:133: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(state->roundTrip.buf, state->data.buf, dictSize);
data/lz4-1.9.2/ossfuzz/round_trip_stream_fuzzer.c:160: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(data2.buf, state->data.buf, state->data.size);
data/lz4-1.9.2/ossfuzz/round_trip_stream_fuzzer.c:231: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(data2.buf, state->data.buf, state->data.size);
data/lz4-1.9.2/ossfuzz/standaloneengine.c:22: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).
    infile = fopen(argv[ii], "rb");
data/lz4-1.9.2/programs/bench.c:440:13:  [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).
        f = fopen(fileNamesTable[n], "rb");
data/lz4-1.9.2/programs/bench.c:465: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 mfName[20] = {0};
data/lz4-1.9.2/programs/bench.c:502: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 name[20] = {0};
data/lz4-1.9.2/programs/datagen.c:187: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(buff, buff + RDG_BLOCKSIZE, RDG_DICTSIZE);
data/lz4-1.9.2/programs/lz4io.c:319:13:  [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).
        f = fopen(srcFileName, "rb");
data/lz4-1.9.2/programs/lz4io.c:344:17:  [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).
            f = fopen( dstFileName, "rb" );
data/lz4-1.9.2/programs/lz4io.c:359:13:  [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).
        f = fopen( dstFileName, "wb" );
data/lz4-1.9.2/programs/lz4io.c:539: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(dictBuf, circularBuf + dictStart, circularBufSize - dictStart);
data/lz4-1.9.2/programs/lz4io.c:540: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(dictBuf + circularBufSize - dictStart, circularBuf, dictLen - (circularBufSize - dictStart));
data/lz4-1.9.2/programs/lz4io.c:887:19:  [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 lastZeroByte[1] = { 0 };
data/lz4-1.9.2/programs/lz4io.c:1054:111:  [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 unsigned long long LZ4IO_passThrough(LZ4IO_prefs_t* const prefs, FILE* finput, FILE* foutput, unsigned char MNstore[MAGICNUMBER_SIZE])
data/lz4-1.9.2/programs/lz4io.c:1096:14:  [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 MNstore[MAGICNUMBER_SIZE];
data/lz4-1.9.2/programs/lz4io.c:1267: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(outFileName, inFileNamesTable[i], ifnSize - suffixSize);
data/lz4-1.9.2/programs/lz4io.c:1321:14:  [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 blockInfo[LZ4F_BLOCK_HEADER_SIZE];
data/lz4-1.9.2/programs/lz4io.c:1361:14:  [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 blockInfo[LZIO_LEGACY_BLOCK_HEADER_SIZE];
data/lz4-1.9.2/programs/lz4io.c:1404:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(buf, "%.2Lf%c", size, units[i]);
data/lz4-1.9.2/programs/lz4io.c:1425:14:  [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 buffer[LZ4F_HEADER_SIZE_MAX];
data/lz4-1.9.2/programs/lz4io.c:1471:41:  [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 bTypeBuffer[5];
data/lz4-1.9.2/programs/lz4io.c:1588:17:  [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 buffers[3][10];
data/lz4-1.9.2/programs/util.h:403: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(path, dirName, dirLength);
data/lz4-1.9.2/programs/util.h:420: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(path, dirName, dirLength);
data/lz4-1.9.2/programs/util.h:422: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(path+dirLength+1, cFile.cFileName, fnameLength);
data/lz4-1.9.2/programs/util.h:479: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(path, dirName, dirLength);
data/lz4-1.9.2/programs/util.h:481: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(path+dirLength+1, entry->d_name, fnameLength);
data/lz4-1.9.2/tests/checkFrame.c:299:23:  [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).
            srcFile = fopen(argument, "rb");
data/lz4-1.9.2/tests/frametest.c:321: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(decodedBuffer, (char*)compressedBuffer+16, 32);  /* save correct data */
data/lz4-1.9.2/tests/frametest.c:322: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((char*)compressedBuffer+16, (const char*)decodedBuffer+32, 32);  /* insert noise */
data/lz4-1.9.2/tests/frametest.c:331: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((char*)compressedBuffer+16, decodedBuffer, 32);  /* restore correct data */
data/lz4-1.9.2/tests/frametest.c:836:13:  [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(iBuffer, ip, iSizeMax);
data/lz4-1.9.2/tests/frametest.c:1063:21:  [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((BYTE*)compressedBuffer + pos, (const char*)CNBuffer + noiseStart, noiseLength);
data/lz4-1.9.2/tests/fullbench.c:401:28:  [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* const inFile = fopen( inFileName, "rb" );
data/lz4-1.9.2/tests/fuzzer.c:393:13:  [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(lowAddrBuffer, block, blockSize);
data/lz4-1.9.2/tests/fuzzer.c:497:13:  [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(cBuffer_exact, compressedBuffer, compressedSize);
data/lz4-1.9.2/tests/fuzzer.c:586:25:  [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(cBuffer_exact + pos, (const char*)CNBuffer + noiseStart, noiseLength);
data/lz4-1.9.2/tests/fuzzer.c:593:17:  [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(decodedBuffer+blockSize, &endMark, sizeof(endMark));
data/lz4-1.9.2/tests/fuzzer.c:692: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(decodedBuffer, dict, dictSize);
data/lz4-1.9.2/tests/fuzzer.c:1018: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 ringBuffer[ringBufferSize] = {0};
data/lz4-1.9.2/tests/fuzzer.c:1042: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 tmp[17];
data/lz4-1.9.2/tests/fuzzer.c:1064: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(startInput, testInput, sampleSize);  /* copy at end of buffer */
data/lz4-1.9.2/tests/fuzzer.c:1092:17:  [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(startInput, testCompressed, cSize);
data/lz4-1.9.2/tests/fuzzer.c:1149:17:  [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 (ringBuffer + rNext, testInput + iNext, messageSize);
data/lz4-1.9.2/tests/fuzzer.c:1354:17:  [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 (ringBuffer + rNext, testInput + iNext, messageSize);
data/lz4-1.9.2/tests/fuzzer.c:1447:13:  [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(testInput + iNext, testInput + (BSIZE1-65535), messageSize);  /* will generate a match at max distance == 65535 */
data/lz4-1.9.2/tests/roundTripTest.c:184:21:  [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* const f = fopen(fileName, "rb");
data/lz4-1.9.2/examples/HCStreaming_ringBuffer.c:228:18:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        unused = getchar(); (void)unused;   /* silence static analyzer */
data/lz4-1.9.2/examples/blockStreaming_lineByLine.c:63: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).
        inpBytes = (int) strlen(inpPtr);
data/lz4-1.9.2/examples/compress_functions.c:248:27:  [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 src_size = strlen(src) + 1;
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:42:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read != 1) { exit(12); }
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:48:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    return read;
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:124:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read != sizeof(magic)) { exit(1); }
data/lz4-1.9.2/examples/dictionaryRandomAccess.c:152:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if(read != (size_t)cmpBytes) { exit(4); }
data/lz4-1.9.2/examples/simple_buffer.c:43: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).
  const int src_size = (int)(strlen(src) + 1);
data/lz4-1.9.2/programs/bench.c:182:9:  [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 (strlen(displayName)>17) displayName += strlen(displayName)-17;   /* can only display 17 characters */
data/lz4-1.9.2/programs/bench.c:182:48:  [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 (strlen(displayName)>17) displayName += strlen(displayName)-17;   /* can only display 17 characters */
data/lz4-1.9.2/programs/lz4cli.c:236:11:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    (void)getchar();
data/lz4-1.9.2/programs/lz4cli.c:252: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 !strncmp(exeName, test, strlen(test)) &&
data/lz4-1.9.2/programs/lz4cli.c:253: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).
        (exeName[strlen(test)] == '\0' || exeName[strlen(test)] == '.');
data/lz4-1.9.2/programs/lz4cli.c:253:51:  [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).
        (exeName[strlen(test)] == '\0' || exeName[strlen(test)] == '.');
data/lz4-1.9.2/programs/lz4cli.c:286:28:  [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 const comSize = strlen(longCommand);
data/lz4-1.9.2/programs/lz4cli.c:300:28:  [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 const inSize  = strlen(inputFilename);
data/lz4-1.9.2/programs/lz4cli.c:301:28:  [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 const extSize = strlen(LZ4_EXTENSION);
data/lz4-1.9.2/programs/lz4cli.c:471: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).
                    argument += strlen(argument) - 1;
data/lz4-1.9.2/programs/lz4cli.c:682: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).
            size_t const l = strlen(input_filename);
data/lz4-1.9.2/programs/lz4cli.c:693: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).
            size_t const inl = strlen(input_filename);
data/lz4-1.9.2/programs/lz4io.c:352:30:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                {   int ch = getchar();
data/lz4-1.9.2/programs/lz4io.c:357:58:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    while ((ch!=EOF) && (ch!='\n')) ch = getchar();  /* flush rest of input line */
data/lz4-1.9.2/programs/lz4io.c:761:31:  [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 suffixSize = strlen(suffix);
data/lz4-1.9.2/programs/lz4io.c:769: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).
        size_t const ifnSize = strlen(inFileNamesTable[i]);
data/lz4-1.9.2/programs/lz4io.c:1243:31:  [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 const suffixSize = strlen(suffix);
data/lz4-1.9.2/programs/lz4io.c:1250: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).
        size_t const ifnSize = strlen(inFileNamesTable[i]);
data/lz4-1.9.2/programs/util.h:399:17:  [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).
    dirLength = strlen(dirName);
data/lz4-1.9.2/programs/util.h:417:38:  [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 const fnameLength = (int)strlen(cFile.cFileName);
data/lz4-1.9.2/programs/util.h:440:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(*bufStart + *pos, path, *bufEnd - (*bufStart + *pos));
data/lz4-1.9.2/programs/util.h:469: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).
    dirLength = (int)strlen(dirName);
data/lz4-1.9.2/programs/util.h:476:28:  [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).
        fnameLength = (int)strlen(entry->d_name);
data/lz4-1.9.2/programs/util.h:496:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(*bufStart + *pos, path, *bufEnd - (*bufStart + *pos));
data/lz4-1.9.2/programs/util.h:545: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).
            size_t const len = strlen(inputNames[i]);
data/lz4-1.9.2/programs/util.h:552:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf + pos, inputNames[i], bufSize - pos);
data/lz4-1.9.2/programs/util.h:570:16:  [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).
        pos += strlen(fileTable[i]) + 1;
data/lz4-1.9.2/tests/checkTag.c:48: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).
    size_t const tagLength = strlen(tag);
data/lz4-1.9.2/tests/checkTag.c:49: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).
    size_t const verLength = strlen(LZ4_VERSION_STRING);
data/lz4-1.9.2/tests/frametest.c:1088:15:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        (void)getchar();
data/lz4-1.9.2/tests/fullbench.c:684:54:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (g_pause) { printf("press enter...\n"); (void)getchar(); }
data/lz4-1.9.2/tests/fuzzer.c:1654:19:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            (void)getchar();

ANALYSIS SUMMARY:

Hits = 289
Lines analyzed = 20868 in approximately 0.78 seconds (26613 lines/second)
Physical Source Lines of Code (SLOC) = 14060
Hits@level = [0] 197 [1]  40 [2] 206 [3]   1 [4]  39 [5]   3
Hits@level+ = [0+] 486 [1+] 289 [2+] 249 [3+]  43 [4+]  42 [5+]   3
Hits/KSLOC@level+ = [0+] 34.5661 [1+] 20.5548 [2+] 17.7098 [3+] 3.05832 [4+] 2.9872 [5+] 0.213371
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.