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/python-mysqldb-1.4.4/MySQLdb/_mysql.c

FINAL RESULTS:

data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:71:9:  [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;
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:76:14:  [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).
    if (!(c->open)) { \
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:106:14:  [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).
    if (!(c->open)) {
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:900:23:  [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).
    if (self && self->open) {
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:959:23:  [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).
    if (self && self->open) {
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1224: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[256];
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1261: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[256]="";
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1989:15:  [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).
    if (self->open) {
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:2001: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[300];
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:2002:15:  [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).
    if (self->open)
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:2038: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[300];
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:2286:42:  [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).
        offsetof(_mysql_ConnectionObject,open),
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:2391:45:  [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).
        return PyInt_FromLong((long)!(self->open));
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1225:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(buf, fields[i].table, 256);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1226: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).
            len = strlen(buf);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1227:13:  [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. Risk is low because the source is a
  constant character.
            strncat(buf, ".", 256-len);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1228: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).
            len = strlen(buf);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1229:13:  [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, fields[i].name, 256-len);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1262: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(fields[i].table)) {
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1263:17:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
                strncpy(buf, fields[i].table, 256);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1264: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).
                len = strlen(buf);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1265:17:  [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. Risk is low because the source is a
  constant character.
                strncat(buf, ".", 256-len);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1266: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).
                len = strlen(buf);
data/python-mysqldb-1.4.4/MySQLdb/_mysql.c:1268:13:  [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, fields[i].name, 256-len);

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 2743 in approximately 0.08 seconds (32396 lines/second)
Physical Source Lines of Code (SLOC) = 2238
Hits@level = [0]   3 [1]  11 [2]  13 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  27 [1+]  24 [2+]  13 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 12.0643 [1+] 10.7239 [2+] 5.80876 [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.