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/libdbd-mariadb-perl-1.21/dbdimp.c
Examining data/libdbd-mariadb-perl-1.21/socket.c
Examining data/libdbd-mariadb-perl-1.21/dbdimp.h

FINAL RESULTS:

data/libdbd-mariadb-perl-1.21/dbdimp.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(ptr, ph->value, ph->len);
data/libdbd-mariadb-perl-1.21/dbdimp.c:3409: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 buf[64];
data/libdbd-mariadb-perl-1.21/dbdimp.c:3664: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(SvPVX(sv), prefix, prefix_len);
data/libdbd-mariadb-perl-1.21/dbdimp.c:3665: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(SvPVX(sv)+prefix_len, row[0], lengths[0]);
data/libdbd-mariadb-perl-1.21/dbdimp.c:5132: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 buf[64];
data/libdbd-mariadb-perl-1.21/dbdimp.c:5754: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 key[100];
data/libdbd-mariadb-perl-1.21/dbdimp.c:5759:26:  [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.
                keylen = sprintf(key, "%d", i);
data/libdbd-mariadb-perl-1.21/dbdimp.c:1479: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).
            if (strlen(options) != options_len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:1502: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).
            if (strlen(options) != options_len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:1640:15:  [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(df) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:1795:15:  [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(df) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:1813:15:  [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(gr) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:1843:23:  [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(attr_name) != (STRLEN)attr_name_len || strlen(attr_val) != attr_val_len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:1843:69:  [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(attr_name) != (STRLEN)attr_name_len || strlen(attr_val) != attr_val_len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:2011:12:  [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(client_key) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:2022:12:  [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(client_cert) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:2033:12:  [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(ca_file) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:2044:12:  [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(ca_path) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:2055:12:  [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(cipher) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:2317:7:  [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(str) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:3268:11:  [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(str) != len)
data/libdbd-mariadb-perl-1.21/dbdimp.c:3607:29:  [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 prefix_len = strlen(prefix);
data/libdbd-mariadb-perl-1.21/dbdimp.c:5604:20:  [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).
          length = strlen(curField->name);
data/libdbd-mariadb-perl-1.21/dbdimp.c:5618:20:  [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).
          length = strlen(curField->table);
data/libdbd-mariadb-perl-1.21/dbdimp.c:6296: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).
    if (!hv_store(hv, (char*) cols[i], strlen(cols[i]), newSVuv(i), 0))

ANALYSIS SUMMARY:

Hits = 25
Lines analyzed = 7404 in approximately 0.22 seconds (34064 lines/second)
Physical Source Lines of Code (SLOC) = 5574
Hits@level = [0]   1 [1]  18 [2]   7 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  26 [1+]  25 [2+]   7 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.66451 [1+] 4.48511 [2+] 1.25583 [3+]   0 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.