The following issues were found

test/thirdparty/Fuzzer/test/InitializeTest.cpp
1 issues
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)
Security

Line: 22 Column: 15 CWE codes: 126

              }

extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
  if (Size == strlen(argv0) &&
      !strncmp(reinterpret_cast<const char *>(Data), argv0, Size)) {
    fprintf(stderr, "BINGO %s\n", argv0);
    exit(1);
  }
  return 0;

            

Reported by FlawFinder.

test/thirdparty/Fuzzer/test/LoadTest.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 18 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
  if (Size < 8) return 0;
  size_t a = 0;
  memcpy(&a, Data, 8);
  Sink = array[a % (kArraySize + 1)];
  return 0;
}


            

Reported by FlawFinder.

benchmarks/src/benchmarks.cpp
1 issues
syntax error
Error

Line: 92

              
    state.SetBytesProcessed(state.iterations() * j.dump(indent).size());
}
BENCHMARK_CAPTURE(Dump, jeopardy / -,          TEST_DATA_DIRECTORY "/jeopardy/jeopardy.json",                 -1);
BENCHMARK_CAPTURE(Dump, jeopardy / 4,          TEST_DATA_DIRECTORY "/jeopardy/jeopardy.json",                 4);
BENCHMARK_CAPTURE(Dump, canada / -,            TEST_DATA_DIRECTORY "/nativejson-benchmark/canada.json",       -1);
BENCHMARK_CAPTURE(Dump, canada / 4,            TEST_DATA_DIRECTORY "/nativejson-benchmark/canada.json",       4);
BENCHMARK_CAPTURE(Dump, citm_catalog / -,      TEST_DATA_DIRECTORY "/nativejson-benchmark/citm_catalog.json", -1);
BENCHMARK_CAPTURE(Dump, citm_catalog / 4,      TEST_DATA_DIRECTORY "/nativejson-benchmark/citm_catalog.json", 4);

            

Reported by Cppcheck.

test/thirdparty/Fuzzer/test/SwitchTest.cpp
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 34 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              bool ShortSwitch(const uint8_t *Data, size_t Size) {
  short X;
  if (Size < sizeof(short)) return false;
  memcpy(&X, Data, sizeof(short));
  switch(X) {
    case 42: Sink = __LINE__; break;
    case 402: Sink = __LINE__; break;
    case 4002: Sink = __LINE__; break;
    case 5002: Sink = __LINE__; break;

            

Reported by FlawFinder.