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/ruby-odbc-0.99998/ext/utf8/odbc.c
Examining data/ruby-odbc-0.99998/ext/utf8/init.c
Examining data/ruby-odbc-0.99998/ext/odbc.c
Examining data/ruby-odbc-0.99998/ext/init.c

FINAL RESULTS:

data/ruby-odbc-0.99998/ext/odbc.c:2166:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, m, args);
data/ruby-odbc-0.99998/ext/odbc.c:2186:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, m, args);
data/ruby-odbc-0.99998/ext/odbc.c:6604:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buffer, "%d-%d-%dT00:00:00%s",
data/ruby-odbc-0.99998/ext/odbc.c:7031: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(p, name);
data/ruby-odbc-0.99998/ext/odbc.c:7054: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(p, name);
data/ruby-odbc-0.99998/ext/odbc.c:7058: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(p, na[i + q->ncols]);
data/ruby-odbc-0.99998/ext/odbc.c:7260:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buffer, "%d-%d-%dT00:00:00%s",
data/ruby-odbc-0.99998/ext/odbc.c:7376:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(p, "%s#%d", valp, i);
data/ruby-odbc-0.99998/ext/init.c:133: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 *dm_name = getenv("RUBY_ODBC_DM");
data/ruby-odbc-0.99998/ext/init.c:134:23:  [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 *inst_name = getenv("RUBY_ODBC_INST");
data/ruby-odbc-0.99998/ext/odbc.c:196: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 buffer[sizeof (double) * 4 + sizeof (TIMESTAMP_STRUCT)];
data/ruby-odbc-0.99998/ext/odbc.c:1885: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[32], tmp[SQL_MAX_MESSAGE_LENGTH];
data/ruby-odbc-0.99998/ext/odbc.c:1907:6:  [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, " (%d) ", (int) nativeerr);
data/ruby-odbc-0.99998/ext/odbc.c:1932:6:  [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(tmp, "INTERN (0) [RubyODBC]Unknown error %d", (int) err);
data/ruby-odbc-0.99998/ext/odbc.c:1965: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 msg[SQL_MAX_MESSAGE_LENGTH];
data/ruby-odbc-0.99998/ext/odbc.c:1967: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/ruby-odbc-0.99998/ext/odbc.c:1991:8:  [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 *) msg)[SQL_MAX_MESSAGE_LENGTH - 1] = '\0';
data/ruby-odbc-0.99998/ext/odbc.c:2003:6:  [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, "INSTALLER (%d) ", (int) insterrcode);
data/ruby-odbc-0.99998/ext/odbc.c:2028:6:  [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, "Unknown installer error %d", (int) err);
data/ruby-odbc-0.99998/ext/odbc.c:2057: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 msg[32];
data/ruby-odbc-0.99998/ext/odbc.c:2077: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(msg, "SQL_RETURN=%d", (int) ret);
data/ruby-odbc-0.99998/ext/odbc.c:2279: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[SQL_MAX_MESSAGE_LENGTH + 1], *p;
data/ruby-odbc-0.99998/ext/odbc.c:2286:5:  [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(buf, "INTERN (1) [RubyODBC]");
data/ruby-odbc-0.99998/ext/odbc.c:2350: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 dsn[SQL_MAX_DSN_LENGTH], descr[SQL_MAX_MESSAGE_LENGTH * 2];
data/ruby-odbc-0.99998/ext/odbc.c:2406: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 driver[SQL_MAX_MESSAGE_LENGTH], attrs[SQL_MAX_MESSAGE_LENGTH * 2];
data/ruby-odbc-0.99998/ext/odbc.c:2717: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 *sfname, *saname, *skname, valbuf[SQL_MAX_MESSAGE_LENGTH];
data/ruby-odbc-0.99998/ext/odbc.c:4031: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(buffer, "Unknown info type %d for ODBC::Connection.get_info",
data/ruby-odbc-0.99998/ext/odbc.c:4517: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 name[SQL_MAX_MESSAGE_LENGTH];
data/ruby-odbc-0.99998/ext/odbc.c:4542: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 tmpbuf[1];
data/ruby-odbc-0.99998/ext/odbc.c:5697: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/ruby-odbc-0.99998/ext/odbc.c:5700: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(buf, "%04d-%02d-%02d", date->year, date->month, date->day);
data/ruby-odbc-0.99998/ext/odbc.c:5925: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/ruby-odbc-0.99998/ext/odbc.c:5928: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(buf, "%02d:%02d:%02d", time->hour, time->minute, time->second);
data/ruby-odbc-0.99998/ext/odbc.c:6185: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[256];
data/ruby-odbc-0.99998/ext/odbc.c:6188: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(buf, "%04d-%02d-%02d %02d:%02d:%02d %u",
data/ruby-odbc-0.99998/ext/odbc.c:6599: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 buffer[128];
data/ruby-odbc-0.99998/ext/odbc.c:6831: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[32];
data/ruby-odbc-0.99998/ext/odbc.c:6833: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(buf, "#%d", i);
data/ruby-odbc-0.99998/ext/odbc.c:6942:6:  [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 name[SQL_MAX_MESSAGE_LENGTH];
data/ruby-odbc-0.99998/ext/odbc.c:7097:8:  [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(p, "#%d", i);
data/ruby-odbc-0.99998/ext/odbc.c:7255: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 buffer[128];
data/ruby-odbc-0.99998/ext/odbc.c:7358:7:  [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(p, "#%d", i);
data/ruby-odbc-0.99998/ext/odbc.c:7525: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 msg[128], *err;
data/ruby-odbc-0.99998/ext/odbc.c:7541: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(msg, "SQLExtendedFetch(%d)", idir);
data/ruby-odbc-0.99998/ext/odbc.c:7545: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(msg, "SQLFetchScroll(%d)", idir);
data/ruby-odbc-0.99998/ext/odbc.c:8307: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(q->paraminfo[pnum].outbuf, *(SQLWCHAR **) valp, vlen);
data/ruby-odbc-0.99998/ext/odbc.c:8310: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(q->paraminfo[pnum].outbuf, valp, vlen);
data/ruby-odbc-0.99998/ext/odbc.c:1444: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).
	    len = strlen((char *) str);
data/ruby-odbc-0.99998/ext/odbc.c:2288:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
    strncat(buf, p, SQL_MAX_MESSAGE_LENGTH - strlen(buf));
data/ruby-odbc-0.99998/ext/odbc.c:2288:46:  [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).
    strncat(buf, p, SQL_MAX_MESSAGE_LENGTH - strlen(buf));
data/ruby-odbc-0.99998/ext/odbc.c:2380:41:  [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).
	dsnLen = (dsnLen == 0) ? (SQLSMALLINT) strlen(dsn) : dsnLen;
data/ruby-odbc-0.99998/ext/odbc.c:2381: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).
	descrLen = (descrLen == 0) ? (SQLSMALLINT) strlen(descr) : descrLen;
data/ruby-odbc-0.99998/ext/odbc.c:2446:47:  [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).
	driverLen = (driverLen == 0) ? (SQLSMALLINT) strlen(driver) : driverLen;
data/ruby-odbc-0.99998/ext/odbc.c:2448:36:  [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 (attr = attrs; *attr; attr += strlen(attr) + 1) {
data/ruby-odbc-0.99998/ext/odbc.c:6748:39:  [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).
	cnLen = (cnLen == 0) ? (SQLSMALLINT) strlen((char *) cname) : cnLen;
data/ruby-odbc-0.99998/ext/odbc.c:6970: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).
		need_len = 2 * (strlen(name) + 1);
data/ruby-odbc-0.99998/ext/odbc.c:6998: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).
		need_len = 2 * (strlen(name) + 1);
data/ruby-odbc-0.99998/ext/odbc.c:7033:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(p, ".");
data/ruby-odbc-0.99998/ext/odbc.c:7034: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).
		p += strlen(p);
data/ruby-odbc-0.99998/ext/odbc.c:7055: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).
		p += strlen(p) + 1;
data/ruby-odbc-0.99998/ext/odbc.c:7061: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).
		p += strlen(p) + 1;
data/ruby-odbc-0.99998/ext/odbc.c:7368:37:  [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).
	    name = ID2SYM(rb_intern3(valp, strlen(valp), rb_enc));
data/ruby-odbc-0.99998/ext/odbc.c:7378: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).
		name = ID2SYM(rb_intern3(p, strlen(p), rb_enc));
data/ruby-odbc-0.99998/ext/odbc.c:8020:21:  [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 (llen != (long) strlen((char *) up)) {
data/ruby-odbc-0.99998/ext/odbc.c:8056:27:  [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 (rlen != (SQLINTEGER) strlen((char *) valp)) {
data/ruby-odbc-0.99998/ext/odbc.c:8198:27:  [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 (rlen != (SQLINTEGER) strlen((char *) valp)) {

ANALYSIS SUMMARY:

Hits = 66
Lines analyzed = 9665 in approximately 0.21 seconds (46975 lines/second)
Physical Source Lines of Code (SLOC) = 8517
Hits@level = [0]  24 [1]  19 [2]  37 [3]   2 [4]   8 [5]   0
Hits@level+ = [0+]  90 [1+]  66 [2+]  47 [3+]  10 [4+]   8 [5+]   0
Hits/KSLOC@level+ = [0+] 10.5671 [1+] 7.74921 [2+] 5.51838 [3+] 1.17412 [4+] 0.939298 [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.