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/re2-20201101+dfsg/re2/bitmap256.h
Examining data/re2-20201101+dfsg/re2/bitstate.cc
Examining data/re2-20201101+dfsg/re2/compile.cc
Examining data/re2-20201101+dfsg/re2/dfa.cc
Examining data/re2-20201101+dfsg/re2/filtered_re2.cc
Examining data/re2-20201101+dfsg/re2/filtered_re2.h
Examining data/re2-20201101+dfsg/re2/fuzzing/compiler-rt/include/fuzzer/FuzzedDataProvider.h
Examining data/re2-20201101+dfsg/re2/fuzzing/re2_fuzzer.cc
Examining data/re2-20201101+dfsg/re2/mimics_pcre.cc
Examining data/re2-20201101+dfsg/re2/nfa.cc
Examining data/re2-20201101+dfsg/re2/onepass.cc
Examining data/re2-20201101+dfsg/re2/parse.cc
Examining data/re2-20201101+dfsg/re2/pod_array.h
Examining data/re2-20201101+dfsg/re2/prefilter.cc
Examining data/re2-20201101+dfsg/re2/prefilter.h
Examining data/re2-20201101+dfsg/re2/prefilter_tree.cc
Examining data/re2-20201101+dfsg/re2/prefilter_tree.h
Examining data/re2-20201101+dfsg/re2/prog.cc
Examining data/re2-20201101+dfsg/re2/prog.h
Examining data/re2-20201101+dfsg/re2/re2.cc
Examining data/re2-20201101+dfsg/re2/re2.h
Examining data/re2-20201101+dfsg/re2/regexp.cc
Examining data/re2-20201101+dfsg/re2/regexp.h
Examining data/re2-20201101+dfsg/re2/set.cc
Examining data/re2-20201101+dfsg/re2/set.h
Examining data/re2-20201101+dfsg/re2/simplify.cc
Examining data/re2-20201101+dfsg/re2/sparse_array.h
Examining data/re2-20201101+dfsg/re2/sparse_set.h
Examining data/re2-20201101+dfsg/re2/stringpiece.cc
Examining data/re2-20201101+dfsg/re2/stringpiece.h
Examining data/re2-20201101+dfsg/re2/testing/backtrack.cc
Examining data/re2-20201101+dfsg/re2/testing/charclass_test.cc
Examining data/re2-20201101+dfsg/re2/testing/compile_test.cc
Examining data/re2-20201101+dfsg/re2/testing/dfa_test.cc
Examining data/re2-20201101+dfsg/re2/testing/dump.cc
Examining data/re2-20201101+dfsg/re2/testing/exhaustive1_test.cc
Examining data/re2-20201101+dfsg/re2/testing/exhaustive2_test.cc
Examining data/re2-20201101+dfsg/re2/testing/exhaustive3_test.cc
Examining data/re2-20201101+dfsg/re2/testing/exhaustive_test.cc
Examining data/re2-20201101+dfsg/re2/testing/exhaustive_tester.cc
Examining data/re2-20201101+dfsg/re2/testing/exhaustive_tester.h
Examining data/re2-20201101+dfsg/re2/testing/filtered_re2_test.cc
Examining data/re2-20201101+dfsg/re2/testing/mimics_pcre_test.cc
Examining data/re2-20201101+dfsg/re2/testing/null_walker.cc
Examining data/re2-20201101+dfsg/re2/testing/parse_test.cc
Examining data/re2-20201101+dfsg/re2/testing/possible_match_test.cc
Examining data/re2-20201101+dfsg/re2/testing/random_test.cc
Examining data/re2-20201101+dfsg/re2/testing/re2_arg_test.cc
Examining data/re2-20201101+dfsg/re2/testing/re2_test.cc
Examining data/re2-20201101+dfsg/re2/testing/regexp_benchmark.cc
Examining data/re2-20201101+dfsg/re2/testing/regexp_generator.cc
Examining data/re2-20201101+dfsg/re2/testing/regexp_generator.h
Examining data/re2-20201101+dfsg/re2/testing/regexp_test.cc
Examining data/re2-20201101+dfsg/re2/testing/required_prefix_test.cc
Examining data/re2-20201101+dfsg/re2/testing/search_test.cc
Examining data/re2-20201101+dfsg/re2/testing/set_test.cc
Examining data/re2-20201101+dfsg/re2/testing/simplify_test.cc
Examining data/re2-20201101+dfsg/re2/testing/string_generator.cc
Examining data/re2-20201101+dfsg/re2/testing/string_generator.h
Examining data/re2-20201101+dfsg/re2/testing/string_generator_test.cc
Examining data/re2-20201101+dfsg/re2/testing/tester.cc
Examining data/re2-20201101+dfsg/re2/testing/tester.h
Examining data/re2-20201101+dfsg/re2/tostring.cc
Examining data/re2-20201101+dfsg/re2/unicode_casefold.h
Examining data/re2-20201101+dfsg/re2/unicode_groups.h
Examining data/re2-20201101+dfsg/re2/walker-inl.h
Examining data/re2-20201101+dfsg/testinstall.cc
Examining data/re2-20201101+dfsg/util/benchmark.cc
Examining data/re2-20201101+dfsg/util/benchmark.h
Examining data/re2-20201101+dfsg/util/flags.h
Examining data/re2-20201101+dfsg/util/fuzz.cc
Examining data/re2-20201101+dfsg/util/logging.h
Examining data/re2-20201101+dfsg/util/malloc_counter.h
Examining data/re2-20201101+dfsg/util/mix.h
Examining data/re2-20201101+dfsg/util/mutex.h
Examining data/re2-20201101+dfsg/util/pcre.cc
Examining data/re2-20201101+dfsg/util/pcre.h
Examining data/re2-20201101+dfsg/util/rune.cc
Examining data/re2-20201101+dfsg/util/strutil.cc
Examining data/re2-20201101+dfsg/util/strutil.h
Examining data/re2-20201101+dfsg/util/test.cc
Examining data/re2-20201101+dfsg/util/test.h
Examining data/re2-20201101+dfsg/util/utf.h
Examining data/re2-20201101+dfsg/util/util.h

FINAL RESULTS:

data/re2-20201101+dfsg/util/benchmark.cc:16:9:  [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 _snprintf
data/re2-20201101+dfsg/util/benchmark.cc:16:18:  [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 _snprintf
data/re2-20201101+dfsg/util/strutil.cc:11:9:  [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 _snprintf
data/re2-20201101+dfsg/util/strutil.cc:11:18:  [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 _snprintf
data/re2-20201101+dfsg/util/strutil.cc:12:9:  [4] (format) vsnprintf:
  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 vsnprintf _vsnprintf
data/re2-20201101+dfsg/util/strutil.cc:104:16:  [4] (format) vsnprintf:
  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.
  int result = vsnprintf(space, sizeof(space), format, backup_ap);
data/re2-20201101+dfsg/util/strutil.cc:127:14:  [4] (format) vsnprintf:
  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.
    result = vsnprintf(buf, length, format, backup_ap);
data/re2-20201101+dfsg/re2/testing/regexp_benchmark.cc:156:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(1);
data/re2-20201101+dfsg/util/fuzz.cc:16:17:  [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.
      data[j] = random() & 0xFF;
data/re2-20201101+dfsg/re2/fuzzing/compiler-rt/include/fuzzer/FuzzedDataProvider.h:272: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.
    std::memcpy(result.data(), data_ptr_, num_bytes_to_consume);
data/re2-20201101+dfsg/re2/parse.cc:2186:3:  [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 buf[UTFmax];
data/re2-20201101+dfsg/re2/prefilter.cc:392:3:  [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 buf[UTFmax];
data/re2-20201101+dfsg/re2/re2.cc:1153:3:  [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 buf[kMaxLength+1];
data/re2-20201101+dfsg/re2/re2.cc:1169:3:  [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 buf[kMaxLength+1];
data/re2-20201101+dfsg/re2/re2.cc:1184:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/re2/re2.cc:1199:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/re2/re2.cc:1260:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/re2/re2.cc:1275:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/re2/regexp.cc:338:3:  [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[sizeof *this];
data/re2-20201101+dfsg/re2/stringpiece.cc:18:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, data_ + pos, ret);
data/re2-20201101+dfsg/re2/testing/dump.cc:99:7:  [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 buf[UTFmax+1];
data/re2-20201101+dfsg/re2/testing/dump.cc:107: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 buf[UTFmax+1];
data/re2-20201101+dfsg/re2/testing/exhaustive3_test.cc:36:3:  [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 buf[UTFmax+1];
data/re2-20201101+dfsg/re2/testing/exhaustive_tester.cc:37:10:  [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 buf[512];
data/re2-20201101+dfsg/util/benchmark.cc:93:3:  [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 mb[100];
data/re2-20201101+dfsg/util/benchmark.cc:94:3:  [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 suf[100];
data/re2-20201101+dfsg/util/pcre.cc:827: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(buf, str, n);
data/re2-20201101+dfsg/util/pcre.cc:841:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/util/pcre.cc:858:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/util/pcre.cc:929:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/util/pcre.cc:946:3:  [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 buf[kMaxNumberLength+1];
data/re2-20201101+dfsg/util/pcre.cc:967:3:  [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 buf[kMaxLength];
data/re2-20201101+dfsg/util/pcre.cc:969:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, str, n);
data/re2-20201101+dfsg/util/rune.cc:186:2:  [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 str[10];
data/re2-20201101+dfsg/util/strutil.cc:97:3:  [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 space[1024];
data/re2-20201101+dfsg/re2/stringpiece.h:67:45:  [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).
      : data_(str), size_(str == NULL ? 0 : strlen(str)) {}
data/re2-20201101+dfsg/re2/stringpiece.h:98: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_ = str == NULL ? 0 : strlen(str);
data/re2-20201101+dfsg/re2/testing/re2_arg_test.cc:101: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).
    bool retval = arg.Parse(p, strlen(p));                               \
data/re2-20201101+dfsg/re2/testing/re2_test.cc:376:19:  [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 patlen = strlen(pattern);

ANALYSIS SUMMARY:

Hits = 39
Lines analyzed = 30235 in approximately 0.67 seconds (44900 lines/second)
Physical Source Lines of Code (SLOC) = 20717
Hits@level = [0]  81 [1]   4 [2]  26 [3]   2 [4]   7 [5]   0
Hits@level+ = [0+] 120 [1+]  39 [2+]  35 [3+]   9 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 5.79234 [1+] 1.88251 [2+] 1.68943 [3+] 0.434426 [4+] 0.337887 [5+]   0
Dot directories skipped = 2 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.