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/lua-sql-2.3.4/src/ls_firebird.c
Examining data/lua-sql-2.3.4/src/ls_mysql.c
Examining data/lua-sql-2.3.4/src/ls_oci8.c
Examining data/lua-sql-2.3.4/src/ls_odbc.c
Examining data/lua-sql-2.3.4/src/ls_postgres.c
Examining data/lua-sql-2.3.4/src/ls_sqlite.c
Examining data/lua-sql-2.3.4/src/ls_sqlite3.c
Examining data/lua-sql-2.3.4/src/luasql.c
Examining data/lua-sql-2.3.4/src/luasql.h
Examining data/lua-sql-2.3.4/vc6/resource.h

FINAL RESULTS:

data/lua-sql-2.3.4/src/ls_firebird.c:32: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			dpb_buffer[256];/* holds the database paramet buffer */
data/lua-sql-2.3.4/src/ls_firebird.c:74: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 errmsg[512];
data/lua-sql-2.3.4/src/ls_firebird.c:166: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 res_buffer[88], *pres;
data/lua-sql-2.3.4/src/ls_firebird.c:198: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 res_buffer[88], *pres;
data/lua-sql-2.3.4/src/ls_firebird.c:424: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 cur_name[32];
data/lua-sql-2.3.4/src/ls_firebird.c:428:3:  [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(cur_name, "dyn_cursor_%p", (void *)user_cur);
data/lua-sql-2.3.4/src/ls_firebird.c:439: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((void*)user_cur, (void*)&cur, sizeof(cur_data));
data/lua-sql-2.3.4/src/ls_firebird.c:610: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 timestr[256];
data/lua-sql-2.3.4/src/ls_firebird.c:663: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(&blob_id, cur->out_sqlda->sqlvar[i].sqldata, sizeof(ISC_QUAD));
data/lua-sql-2.3.4/src/ls_firebird.c:979: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(res_conn, &conn, sizeof(conn_data));
data/lua-sql-2.3.4/src/ls_mysql.c:165: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 typename[50];
data/lua-sql-2.3.4/src/ls_mysql.c:173:3:  [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 (typename, "%.20s(%ld)", getcolumntype (fields[i-1].type), fields[i-1].length);
data/lua-sql-2.3.4/src/ls_mysql.c:506: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_msg[100];
data/lua-sql-2.3.4/src/ls_oci8.c:165: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 (col->name, name, col->namelen);
data/lua-sql-2.3.4/src/ls_postgres.c:192: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 stmt[100];
data/lua-sql-2.3.4/src/ls_postgres.c:195: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 (stmt, "select typname from pg_type where oid = %d", codigo);
data/lua-sql-2.3.4/src/ls_postgres.c:197:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy (buff, "undefined");
data/lua-sql-2.3.4/src/ls_postgres.c:204:5:  [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 (buff, "%.20s (%d)", name, modifier);
data/lua-sql-2.3.4/src/ls_postgres.c:235: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 typename[100];
data/lua-sql-2.3.4/src/luasql.c:54: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 buff[100];
data/lua-sql-2.3.4/src/luasql.c:57:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy (buff, "closed");
data/lua-sql-2.3.4/src/luasql.c:59:3:  [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 (buff, "%p", (void *)obj);
data/lua-sql-2.3.4/src/ls_firebird.c:948: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).
    *dpb++ = (char)strlen(username);
data/lua-sql-2.3.4/src/ls_firebird.c:949: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).
	for(i=0; i<(int)strlen(username); i++)
data/lua-sql-2.3.4/src/ls_firebird.c:952: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).
    *dpb++ = (char)strlen(password);
data/lua-sql-2.3.4/src/ls_firebird.c:953: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).
	for(i=0; i<(int)strlen(password); i++)
data/lua-sql-2.3.4/src/ls_firebird.c:960:49:  [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).
	isc_attach_database(env->status_vector, (short)strlen(sourcename), (char*)sourcename, &conn.db,
data/lua-sql-2.3.4/src/ls_mysql.c:507:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy (error_msg,  mysql_error(conn), 99);
data/lua-sql-2.3.4/src/ls_oci8.c:620:9:  [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).
		(ub4) strlen(statement), (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT),
data/lua-sql-2.3.4/src/ls_oci8.c:718: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).
	size_t snlen = strlen(sourcename);
data/lua-sql-2.3.4/src/ls_oci8.c:719: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).
	size_t userlen = (username) ? strlen(username) : 0;
data/lua-sql-2.3.4/src/ls_oci8.c:720: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).
	size_t passlen = (password) ? strlen(password) : 0;
data/lua-sql-2.3.4/src/ls_postgres.c:207:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy (buff, name, 20);

ANALYSIS SUMMARY:

Hits = 33
Lines analyzed = 5398 in approximately 0.16 seconds (32856 lines/second)
Physical Source Lines of Code (SLOC) = 3736
Hits@level = [0]   0 [1]  11 [2]  22 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  33 [1+]  33 [2+]  22 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 8.83298 [1+] 8.83298 [2+] 5.88865 [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.