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/py-lmdb-1.0.0/lib/lmdb.h
Examining data/py-lmdb-1.0.0/lib/mdb.c
Examining data/py-lmdb-1.0.0/lib/midl.c
Examining data/py-lmdb-1.0.0/lib/midl.h
Examining data/py-lmdb-1.0.0/lib/py-lmdb/preload.h
Examining data/py-lmdb-1.0.0/lib/win32-stdint/stdint.h
Examining data/py-lmdb-1.0.0/lib/win32/inttypes.h
Examining data/py-lmdb-1.0.0/lib/win32/unistd.h
Examining data/py-lmdb-1.0.0/lmdb/cpython.c
Examining data/py-lmdb-1.0.0/misc/cursor-del-break.c
Examining data/py-lmdb-1.0.0/misc/its7733.c

FINAL RESULTS:

data/py-lmdb-1.0.0/lib/mdb.c:4822:4:  [5] (misc) SetSecurityDescriptorDacl:
  Never create NULL ACLs; an attacker can set it to Everyone (Deny All
  Access), which would even forbid administrator access (CWE-732).
			SetSecurityDescriptorDacl(&mdb_null_sd, TRUE, 0, FALSE);
data/py-lmdb-1.0.0/lib/mdb.c:4822:4:  [5] (misc) SetSecurityDescriptorDacl:
  Never create NULL ACLs; an attacker can set it to Everyone (Deny All
  Access), which would even forbid administrator access (CWE-732).
			SetSecurityDescriptorDacl(&mdb_null_sd, TRUE, 0, FALSE);
data/py-lmdb-1.0.0/lib/mdb.c:4139:23:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
# define mdb_name_cpy	wcscpy
data/py-lmdb-1.0.0/lib/mdb.c:4144:23:  [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).
# define mdb_name_cpy	strcpy	/**< Copy name (#mdb_nchar_t string) */
data/py-lmdb-1.0.0/lib/mdb.c:4183:3:  [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(fname->mn_val, path);
data/py-lmdb-1.0.0/lib/mdb.c:4835:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(env->me_txns->mti_rmname, "Global\\MDBr%s", encbuf);
data/py-lmdb-1.0.0/lib/mdb.c:4836:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(env->me_txns->mti_wmname, "Global\\MDBw%s", encbuf);
data/py-lmdb-1.0.0/lib/mdb.c:4862:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(env->me_txns->mti_rmname, "/MDBr%s", encbuf);
data/py-lmdb-1.0.0/lib/mdb.c:4863:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(env->me_txns->mti_wmname, "/MDBw%s", encbuf);
data/py-lmdb-1.0.0/lib/mdb.c:10096:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			sprintf(buf, txnid == (txnid_t)-1 ?
data/py-lmdb-1.0.0/lmdb/cpython.c:66:26:  [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 DEBUG(s, ...) fprintf(stderr, \
data/py-lmdb-1.0.0/lmdb/cpython.c:437:5:  [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.
    vsnprintf(buf, sizeof buf, fmt, ap);
data/py-lmdb-1.0.0/misc/cursor-del-break.c:49:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if(! access(DB_PATH, X_OK)) {
data/py-lmdb-1.0.0/misc/cursor-del-break.c:50:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        system("rm -rf " DB_PATH);
data/py-lmdb-1.0.0/misc/its7733.c:57:10:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if(! access(DB_PATH, X_OK)) {
data/py-lmdb-1.0.0/misc/its7733.c:58:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        system("rm -rf " DB_PATH);
data/py-lmdb-1.0.0/lib/mdb.c:583:15:  [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.
#define DKBUF	char kbuf[DKBUF_MAXKEYSIZE*2+1]
data/py-lmdb-1.0.0/lib/mdb.c:704: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 pad[(sizeof(MDB_rxbody)+CACHELINE-1) & ~(CACHELINE-1)];
data/py-lmdb-1.0.0/lib/mdb.c:729: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	mtb_rmname[MNAME_LEN];
data/py-lmdb-1.0.0/lib/mdb.c:758: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 pad[(sizeof(MDB_txbody)+CACHELINE-1) & ~(CACHELINE-1)];
data/py-lmdb-1.0.0/lib/mdb.c:762: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 mt2_wmname[MNAME_LEN];
data/py-lmdb-1.0.0/lib/mdb.c:768: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 pad[(MNAME_LEN+CACHELINE-1) & ~(CACHELINE-1)];
data/py-lmdb-1.0.0/lib/mdb.c:916: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		mn_data[1];			/**< key and data are appended here */
data/py-lmdb-1.0.0/lib/mdb.c:1058: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		mm_pad[PAGEHDRSZ];
data/py-lmdb-1.0.0/lib/mdb.c:1482: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 buf[MSGSIZE+PADSIZE], *ptr = buf;
data/py-lmdb-1.0.0/lib/mdb.c:1536: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 buf[400];
data/py-lmdb-1.0.0/lib/mdb.c:1537:2:  [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, "%.100s:%d: Assertion '%.200s' failed in %.40s()",
data/py-lmdb-1.0.0/lib/mdb.c:1581:10:  [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.
		ptr += sprintf(ptr, "%02x", *c++);
data/py-lmdb-1.0.0/lib/mdb.c:1583:2:  [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, "%.*s", key->mv_size, key->mv_data);
data/py-lmdb-1.0.0/lib/mdb.c:1591: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.
	static char *const tp[2][2] = {{"", ": DB"}, {": sub-page", ": sub-DB"}};
data/py-lmdb-1.0.0/lib/mdb.c:2334: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(dst, src, (lower + PAGEBASE + (Align-1)) & -Align);
data/py-lmdb-1.0.0/lib/mdb.c:2335: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((pgno_t *)((char *)dst+upper), (pgno_t *)((char *)src+upper),
data/py-lmdb-1.0.0/lib/mdb.c:2338: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(dst, src, psize - unused);
data/py-lmdb-1.0.0/lib/mdb.c:2378:6:  [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(np, mp, num * env->me_psize);
data/py-lmdb-1.0.0/lib/mdb.c:2772: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(txn->mt_dbiseqs, env->me_dbiseqs, env->me_maxdbs * sizeof(unsigned int));
data/py-lmdb-1.0.0/lib/mdb.c:2776:2:  [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(txn->mt_dbs, meta->mm_dbs, CORE_DBS * sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:2885: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(txn->mt_dbs, parent->mt_dbs, txn->mt_numdbs * sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:2896: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(env->me_pghead, ntxn->mnt_pgstate.mf_pghead, size);
data/py-lmdb-1.0.0/lib/mdb.c:3183:4:  [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(data.mv_data, free_pgs, data.mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:3497: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(parent->mt_dbs, txn->mt_dbs, txn->mt_numdbs * sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:4284:7:  [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).
	fd = open(fname->mn_val, which & MDB_O_MASK, mode);
data/py-lmdb-1.0.0/lib/mdb.c:4359:10:  [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).
					i = atoi(uts.release+7);
data/py-lmdb-1.0.0/lib/mdb.c:4363:10:  [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).
					i = atoi(uts.release+7);
data/py-lmdb-1.0.0/lib/mdb.c:4368:9:  [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).
				i = atoi(uts.release+2);
data/py-lmdb-1.0.0/lib/mdb.c:4372:10:  [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).
					i = atoi(uts.release+4);
data/py-lmdb-1.0.0/lib/mdb.c:4376:10:  [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).
					i = atoi(uts.release+4);
data/py-lmdb-1.0.0/lib/mdb.c:4817: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 encbuf[11];
data/py-lmdb-1.0.0/lib/mdb.c:4848: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 encbuf[11];
data/py-lmdb-1.0.0/lib/mdb.c:5626:6:  [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(&flags, ((char *) data.mv_data + offsetof(MDB_db, md_flags)),
data/py-lmdb-1.0.0/lib/mdb.c:5633:6:  [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(mc->mc_db, data.mv_data, sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:6687:4:  [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, key->mv_data, ksize);
data/py-lmdb-1.0.0/lib/mdb.c:6748:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				dkey.mv_data = memcpy(fp+1, olddata.mv_data, olddata.mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:6829:6:  [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(METADATA(mp), METADATA(fp), NUMKEYS(fp) * fp->mp_pad);
data/py-lmdb-1.0.0/lib/mdb.c:6831:6:  [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 *)mp + mp->mp_upper + PAGEBASE, (char *)fp + fp->mp_upper + PAGEBASE,
data/py-lmdb-1.0.0/lib/mdb.c:6833:6:  [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 *)(&mp->mp_ptrs), (char *)(&fp->mp_ptrs), NUMKEYS(fp) * sizeof(mp->mp_ptrs[0]));
data/py-lmdb-1.0.0/lib/mdb.c:6899:7:  [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((size_t *)((char *)np + off),
data/py-lmdb-1.0.0/lib/mdb.c:6903:6:  [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(np, omp, sz); /* Copy beginning of page */
data/py-lmdb-1.0.0/lib/mdb.c:6910:6:  [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(METADATA(omp), data->mv_data, data->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:6924: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(olddata.mv_data, data->mv_data, data->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:6926: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(NODEKEY(leaf), key->mv_data, key->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:7025: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(db, &mc->mc_xcursor->mx_db, sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:7047:25:  [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.
					data[0].mv_data = (char *)data[0].mv_data + data[0].mv_size;
data/py-lmdb-1.0.0/lib/mdb.c:7107:6:  [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(db, &mc->mc_xcursor->mx_db, sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:7295: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(ptr, key->mv_data, ksize);
data/py-lmdb-1.0.0/lib/mdb.c:7355: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(NODEKEY(node), key->mv_data, key->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:7361: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(ndata, data->mv_data, sizeof(pgno_t));
data/py-lmdb-1.0.0/lib/mdb.c:7365: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(ndata, data->mv_data, data->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:7367:4:  [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(ndata, &ofp->mp_pgno, sizeof(pgno_t));
data/py-lmdb-1.0.0/lib/mdb.c:7372: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(ndata, data->mv_data, data->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:7531: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(&mx->mx_db, NODEDATA(node), sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:7768: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 kbuf2[DKBUF_MAXKEYSIZE*2+1];
data/py-lmdb-1.0.0/lib/mdb.c:7814: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(NODEKEY(node), key->mv_data, key->mv_size);
data/py-lmdb-1.0.0/lib/mdb.c:8692: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(rp->mp_ptrs, split, rsize);
data/py-lmdb-1.0.0/lib/mdb.c:8695: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(ins, newkey->mv_data, ksize);
data/py-lmdb-1.0.0/lib/mdb.c:8700:6:  [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(rp->mp_ptrs, split, x * ksize);
data/py-lmdb-1.0.0/lib/mdb.c:8702: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(ins, newkey->mv_data, ksize);
data/py-lmdb-1.0.0/lib/mdb.c:8703: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(ins+ksize, split + x * ksize, rsize - x * ksize);
data/py-lmdb-1.0.0/lib/mdb.c:8899: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(NODEPTR(mp, nkeys-1), NODEPTR(copy, nkeys-1),
data/py-lmdb-1.0.0/lib/mdb.c:9038: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 *mc_wbuf[2];
data/py-lmdb-1.0.0/lib/mdb.c:9039: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 *mc_over[2];
data/py-lmdb-1.0.0/lib/mdb.c:9216:7:  [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(NODEDATA(ni), &my->mc_next_pgno, sizeof(pgno_t));
data/py-lmdb-1.0.0/lib/mdb.c:9227:7:  [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(mo, omp, my->mc_env->me_psize);
data/py-lmdb-1.0.0/lib/mdb.c:9256:7:  [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(NODEDATA(ni), &db, sizeof(db));
data/py-lmdb-1.0.0/lib/mdb.c:9832: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(&txn->mt_dbs[slot], data.mv_data, sizeof(MDB_db));
data/py-lmdb-1.0.0/lib/mdb.c:10083: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 buf[64];
data/py-lmdb-1.0.0/lib/mdb.c:10278:10:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
		need = MultiByteToWideChar(CP_UTF8, 0, src, -1, result, need);
data/py-lmdb-1.0.0/lib/midl.c:180:2:  [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(&ids[ids[0]+1], &app[1], app[0] * sizeof(MDB_ID));
data/py-lmdb-1.0.0/lib/midl.h:68:34:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define MDB_IDL_CPY( dst, src ) (memcpy( dst, src, MDB_IDL_SIZEOF( src ) ))
data/py-lmdb-1.0.0/lib/py-lmdb/preload.h:44:28:  [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.
            j = ((volatile char *)x)[i];
data/py-lmdb-1.0.0/lmdb/cpython.c:434: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[128];
data/py-lmdb-1.0.0/lmdb/cpython.c:3744: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 qualname[64];
data/py-lmdb-1.0.0/misc/cursor-del-break.c:30:1:  [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 recpattern[256];
data/py-lmdb-1.0.0/misc/cursor-del-break.c:64: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 keybuf[40];
data/py-lmdb-1.0.0/misc/cursor-del-break.c:65:24:  [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.
        keyv.mv_size = sprintf(keybuf, "%08x", i);
data/py-lmdb-1.0.0/misc/cursor-del-break.c:80: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 keybuf[40];
data/py-lmdb-1.0.0/misc/cursor-del-break.c:81:18:  [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.
        int sz = sprintf(keybuf, "%08x", i);
data/py-lmdb-1.0.0/lib/mdb.c:4178: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).
	fname->mn_len = strlen(path);
data/py-lmdb-1.0.0/lib/mdb.c:9340:18:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
	my.mc_wbuf[0] = memalign(env->me_os_psize, MDB_WBUF*2);
data/py-lmdb-1.0.0/lib/mdb.c:9760:8:  [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).
	len = strlen(name);
data/py-lmdb-1.0.0/lmdb/cpython.c:3608: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).
    PyObject *o = PyBytes_FromStringAndSize(s, strlen(s));
data/py-lmdb-1.0.0/misc/its7733.c:44: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).
    keyv.mv_size = strlen(k);

ANALYSIS SUMMARY:

Hits = 101
Lines analyzed = 17076 in approximately 0.45 seconds (37898 lines/second)
Physical Source Lines of Code (SLOC) = 11666
Hits@level = [0]  20 [1]   5 [2]  80 [3]   0 [4]  14 [5]   2
Hits@level+ = [0+] 121 [1+] 101 [2+]  96 [3+]  16 [4+]  16 [5+]   2
Hits/KSLOC@level+ = [0+] 10.372 [1+] 8.65764 [2+] 8.22904 [3+] 1.37151 [4+] 1.37151 [5+] 0.171438
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.