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/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_regexp/sqlite3_mod_regexp.c
Examining data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h
Examining data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/sqlite3_mod_vtable.cc
Examining data/golang-github-mattn-go-sqlite3-1.6.0~ds1/sqlite3ext.h

FINAL RESULTS:

data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:50:22:  [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/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:791:8:  [3] (random) setstate:
  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.
    is.setstate(std::ios::failbit);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/sqlite3_mod_vtable.cc:103:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char* cert_file = getenv("SSL_CERT_FILE");
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_regexp/sqlite3_mod_regexp.c:9:34:  [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 *target  = (const char *)sqlite3_value_text(argv[1]);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_regexp/sqlite3_mod_regexp.c:10:34:  [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 *pattern = (const char *)sqlite3_value_text(argv[0]);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:267: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[256];
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:303:4:  [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[7];
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:714: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[64];
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/sqlite3_mod_vtable.cc:47: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(mf->data + mf->size, ptr, block);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/sqlite3_mod_vtable.cc:58: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, mf->data, mf->size);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/sqlite3_mod_vtable.cc:102: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 error[CURL_ERROR_SIZE] = {0};
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/sqlite3ext.h:114:10:  [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).
  int  (*open)(const char*,sqlite3**);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/sqlite3ext.h:397:53:  [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).
#define sqlite3_open                   sqlite3_api->open
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_regexp/sqlite3_mod_regexp.c:16: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).
    rc = pcre_exec(re, NULL, target, strlen(target), 0, 0, vec, 500); 
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:368:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int getc() {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:393:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int ch = getc();
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:402:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (getc() != expect) {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:412:6:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (getc() != *pi) {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:424:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if ((hex = in.getc()) == -1) {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:453:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (in.getc() != '\\' || in.getc() != 'u') {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:453:35:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (in.getc() != '\\' || in.getc() != 'u') {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:485:19:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int ch = in.getc();
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:492:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((ch = in.getc()) == -1) {
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:562:19:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      int ch = in.getc();
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:578:17:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int ch = in.getc();
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:718:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int ch = in.getc();
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:878:44:  [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).
    string err = picojson::parse(v, s, s + strlen(s));			\
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:902:44:  [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).
    string err = picojson::parse(v, s, s + strlen(s));		       \
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:914:44:  [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).
    string err = picojson::parse(v, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:933:44:  [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).
    string err = picojson::parse(v, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:947:44:  [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).
    string err = picojson::parse(v, s, s + strlen(s));	\
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:961: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).
    err = picojson::parse(v1, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:963: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).
    err = picojson::parse(v2, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:972: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).
    err = picojson::parse(v1, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:974: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).
    err = picojson::parse(v2, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:983: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).
    err = picojson::parse(v1, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:985: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).
    err = picojson::parse(v2, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:994: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).
    err = picojson::parse(v1, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:1002: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).
    err = picojson::parse(v2, s, s + strlen(s));
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/picojson.h:1013:34:  [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).
    picojson::_parse(ctx, s, s + strlen(s), &err);
data/golang-github-mattn-go-sqlite3-1.6.0~ds1/_example/mod_vtable/sqlite3_mod_vtable.cc:185:40:  [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).
  sqlite3_result_text(ctxt, strdup(p), strlen(p), free);

ANALYSIS SUMMARY:

Hits = 41
Lines analyzed = 1891 in approximately 0.10 seconds (19225 lines/second)
Physical Source Lines of Code (SLOC) = 1669
Hits@level = [0]   3 [1]  28 [2]  10 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  44 [1+]  41 [2+]  13 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 26.3631 [1+] 24.5656 [2+] 7.7891 [3+] 1.79748 [4+] 0.599161 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.