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/tntdb-1.3/include/tntdb.h
Examining data/tntdb-1.3/include/tntdb/cxxtools/time.h
Examining data/tntdb-1.3/include/tntdb/cxxtools/date.h
Examining data/tntdb-1.3/include/tntdb/cxxtools/datetime.h
Examining data/tntdb-1.3/include/tntdb/row.h
Examining data/tntdb-1.3/include/tntdb/time.h
Examining data/tntdb-1.3/include/tntdb/result.h
Examining data/tntdb-1.3/include/tntdb/statement.h
Examining data/tntdb-1.3/include/tntdb/transaction.h
Examining data/tntdb-1.3/include/tntdb/connection.h
Examining data/tntdb-1.3/include/tntdb/sqlbuilder.h
Examining data/tntdb-1.3/include/tntdb/librarymanager.h
Examining data/tntdb-1.3/include/tntdb/iface/iblob.h
Examining data/tntdb-1.3/include/tntdb/iface/iconnection.h
Examining data/tntdb-1.3/include/tntdb/iface/istatement.h
Examining data/tntdb-1.3/include/tntdb/iface/irow.h
Examining data/tntdb-1.3/include/tntdb/iface/iconnectionmanager.h
Examining data/tntdb-1.3/include/tntdb/iface/icursor.h
Examining data/tntdb-1.3/include/tntdb/iface/iresult.h
Examining data/tntdb-1.3/include/tntdb/iface/ivalue.h
Examining data/tntdb-1.3/include/tntdb/stmtparser.h
Examining data/tntdb-1.3/include/tntdb/decimal.h
Examining data/tntdb-1.3/include/tntdb/error.h
Examining data/tntdb-1.3/include/tntdb/date.h
Examining data/tntdb-1.3/include/tntdb/datetime.h
Examining data/tntdb-1.3/include/tntdb/value.h
Examining data/tntdb-1.3/include/tntdb/postgresql/error.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/result.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/statement.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/connection.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/resultvalue.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/connectionmanager.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/cursor.h
Examining data/tntdb-1.3/include/tntdb/postgresql/impl/resultrow.h
Examining data/tntdb-1.3/include/tntdb/oracle/row.h
Examining data/tntdb-1.3/include/tntdb/oracle/singlerow.h
Examining data/tntdb-1.3/include/tntdb/oracle/result.h
Examining data/tntdb-1.3/include/tntdb/oracle/statement.h
Examining data/tntdb-1.3/include/tntdb/oracle/connection.h
Examining data/tntdb-1.3/include/tntdb/oracle/multivalue.h
Examining data/tntdb-1.3/include/tntdb/oracle/error.h
Examining data/tntdb-1.3/include/tntdb/oracle/multirow.h
Examining data/tntdb-1.3/include/tntdb/oracle/singlevalue.h
Examining data/tntdb-1.3/include/tntdb/oracle/datetime.h
Examining data/tntdb-1.3/include/tntdb/oracle/value.h
Examining data/tntdb-1.3/include/tntdb/oracle/blob.h
Examining data/tntdb-1.3/include/tntdb/oracle/number.h
Examining data/tntdb-1.3/include/tntdb/oracle/connectionmanager.h
Examining data/tntdb-1.3/include/tntdb/oracle/cursor.h
Examining data/tntdb-1.3/include/tntdb/bits/rowreader.h
Examining data/tntdb-1.3/include/tntdb/bits/row.h
Examining data/tntdb-1.3/include/tntdb/bits/result.h
Examining data/tntdb-1.3/include/tntdb/bits/result_iterator.h
Examining data/tntdb-1.3/include/tntdb/bits/statement.h
Examining data/tntdb-1.3/include/tntdb/bits/connection.h
Examining data/tntdb-1.3/include/tntdb/bits/statement_iterator.h
Examining data/tntdb-1.3/include/tntdb/bits/value.h
Examining data/tntdb-1.3/include/tntdb/bits/blob.h
Examining data/tntdb-1.3/include/tntdb/bits/blobstream.h
Examining data/tntdb-1.3/include/tntdb/bits/row_iterator.h
Examining data/tntdb-1.3/include/tntdb/connect.h
Examining data/tntdb-1.3/include/tntdb/connectionpool.h
Examining data/tntdb-1.3/include/tntdb/blob.h
Examining data/tntdb-1.3/include/tntdb/sqlite/error.h
Examining data/tntdb-1.3/include/tntdb/sqlite/impl/stmtvalue.h
Examining data/tntdb-1.3/include/tntdb/sqlite/impl/statement.h
Examining data/tntdb-1.3/include/tntdb/sqlite/impl/stmtrow.h
Examining data/tntdb-1.3/include/tntdb/sqlite/impl/connection.h
Examining data/tntdb-1.3/include/tntdb/sqlite/impl/connectionmanager.h
Examining data/tntdb-1.3/include/tntdb/sqlite/impl/cursor.h
Examining data/tntdb-1.3/include/tntdb/impl/poolconnection.h
Examining data/tntdb-1.3/include/tntdb/impl/row.h
Examining data/tntdb-1.3/include/tntdb/impl/result.h
Examining data/tntdb-1.3/include/tntdb/impl/value.h
Examining data/tntdb-1.3/include/tntdb/impl/blob.h
Examining data/tntdb-1.3/include/tntdb/mysql/error.h
Examining data/tntdb-1.3/include/tntdb/mysql/bindutils.h
Examining data/tntdb-1.3/include/tntdb/mysql/bindvalues.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/result.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/statement.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/connection.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/boundrow.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/rowvalue.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/boundvalue.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/connectionmanager.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/cursor.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/rowcontainer.h
Examining data/tntdb-1.3/include/tntdb/mysql/impl/resultrow.h
Examining data/tntdb-1.3/include/tntdb/mysql/cursor.h
Examining data/tntdb-1.3/include/tntdb/replicate/statement.h
Examining data/tntdb-1.3/include/tntdb/replicate/connection.h
Examining data/tntdb-1.3/include/tntdb/replicate/connectionmanager.h
Examining data/tntdb-1.3/test/colname-test.cpp
Examining data/tntdb-1.3/test/base-test.cpp
Examining data/tntdb-1.3/test/decimal-test.cpp
Examining data/tntdb-1.3/test/sqlbuilder-test.cpp
Examining data/tntdb-1.3/test/types-test.cpp
Examining data/tntdb-1.3/test/test-main.cpp
Examining data/tntdb-1.3/src/date.cpp
Examining data/tntdb-1.3/src/sqlbuilder.cpp
Examining data/tntdb-1.3/src/statement.cpp
Examining data/tntdb-1.3/src/blob.cpp
Examining data/tntdb-1.3/src/poolconnection.cpp
Examining data/tntdb-1.3/src/datetime.cpp
Examining data/tntdb-1.3/src/decimal.cpp
Examining data/tntdb-1.3/src/blobstream.cpp
Examining data/tntdb-1.3/src/valueimpl.cpp
Examining data/tntdb-1.3/src/result.cpp
Examining data/tntdb-1.3/src/statement_iterator.cpp
Examining data/tntdb-1.3/src/connection.cpp
Examining data/tntdb-1.3/src/connectionpool.cpp
Examining data/tntdb-1.3/src/transaction.cpp
Examining data/tntdb-1.3/src/resultimpl.cpp
Examining data/tntdb-1.3/src/stmtparser.cpp
Examining data/tntdb-1.3/src/postgresql/statement.cpp
Examining data/tntdb-1.3/src/postgresql/resultrow.cpp
Examining data/tntdb-1.3/src/postgresql/result.cpp
Examining data/tntdb-1.3/src/postgresql/connection.cpp
Examining data/tntdb-1.3/src/postgresql/error.cpp
Examining data/tntdb-1.3/src/postgresql/connectionmanager.cpp
Examining data/tntdb-1.3/src/postgresql/resultvalue.cpp
Examining data/tntdb-1.3/src/postgresql/cursor.cpp
Examining data/tntdb-1.3/src/oracle/multivalue.cpp
Examining data/tntdb-1.3/src/oracle/statement.cpp
Examining data/tntdb-1.3/src/oracle/blob.cpp
Examining data/tntdb-1.3/src/oracle/datetime.cpp
Examining data/tntdb-1.3/src/oracle/multirow.cpp
Examining data/tntdb-1.3/src/oracle/result.cpp
Examining data/tntdb-1.3/src/oracle/connection.cpp
Examining data/tntdb-1.3/src/oracle/singlevalue.cpp
Examining data/tntdb-1.3/src/oracle/value.cpp
Examining data/tntdb-1.3/src/oracle/error.cpp
Examining data/tntdb-1.3/src/oracle/number.cpp
Examining data/tntdb-1.3/src/oracle/singlerow.cpp
Examining data/tntdb-1.3/src/oracle/row.cpp
Examining data/tntdb-1.3/src/oracle/connectionmanager.cpp
Examining data/tntdb-1.3/src/oracle/cursor.cpp
Examining data/tntdb-1.3/src/time.cpp
Examining data/tntdb-1.3/src/librarymanager.cpp
Examining data/tntdb-1.3/src/sqlite/statement.cpp
Examining data/tntdb-1.3/src/sqlite/connection.cpp
Examining data/tntdb-1.3/src/sqlite/stmtvalue.cpp
Examining data/tntdb-1.3/src/sqlite/error.cpp
Examining data/tntdb-1.3/src/sqlite/stmtrow.cpp
Examining data/tntdb-1.3/src/sqlite/connectionmanager.cpp
Examining data/tntdb-1.3/src/sqlite/cursor.cpp
Examining data/tntdb-1.3/src/mysql/boundvalue.cpp
Examining data/tntdb-1.3/src/mysql/statement.cpp
Examining data/tntdb-1.3/src/mysql/resultrow.cpp
Examining data/tntdb-1.3/src/mysql/result.cpp
Examining data/tntdb-1.3/src/mysql/connection.cpp
Examining data/tntdb-1.3/src/mysql/bindutils.cpp
Examining data/tntdb-1.3/src/mysql/rowcontainer.cpp
Examining data/tntdb-1.3/src/mysql/boundrow.cpp
Examining data/tntdb-1.3/src/mysql/error.cpp
Examining data/tntdb-1.3/src/mysql/bindvalues.cpp
Examining data/tntdb-1.3/src/mysql/rowvalue.cpp
Examining data/tntdb-1.3/src/mysql/connectionmanager.cpp
Examining data/tntdb-1.3/src/mysql/cursor.cpp
Examining data/tntdb-1.3/src/connect.cpp
Examining data/tntdb-1.3/src/error.cpp
Examining data/tntdb-1.3/src/replicate/statement.cpp
Examining data/tntdb-1.3/src/replicate/connection.cpp
Examining data/tntdb-1.3/src/replicate/connectionmanager.cpp
Examining data/tntdb-1.3/src/rowimpl.cpp
Examining data/tntdb-1.3/src/row.cpp
Examining data/tntdb-1.3/demo/pooldemo.cpp
Examining data/tntdb-1.3/demo/person.cpp
Examining data/tntdb-1.3/demo/sqlcmd.cpp
Examining data/tntdb-1.3/demo/prodbench.cpp
Examining data/tntdb-1.3/demo/util.h
Examining data/tntdb-1.3/demo/categories.cpp
Examining data/tntdb-1.3/demo/serial.cpp

FINAL RESULTS:

data/tntdb-1.3/test/base-test.cpp:70:29:  [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.
        const char* dburl = getenv("TNTDBURL");
data/tntdb-1.3/test/colname-test.cpp:57:29:  [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.
        const char* dburl = getenv("TNTDBURL");
data/tntdb-1.3/test/types-test.cpp:168:29:  [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.
        const char* dburl = getenv("TNTDBURL");
data/tntdb-1.3/include/tntdb/mysql/impl/connection.h:46: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).
        void open(const char* app, const char* host,
data/tntdb-1.3/include/tntdb/oracle/statement.h:86:15:  [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[0], value, size);
data/tntdb-1.3/src/blob.cpp:40:14:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        std::memcpy(_data, data, len);
data/tntdb-1.3/src/date.cpp:81: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 ret[10];
data/tntdb-1.3/src/datetime.cpp:69: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 ret[25];
data/tntdb-1.3/src/mysql/bindutils.cpp:81: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(b, bind.buffer, bind.buffer_length);
data/tntdb-1.3/src/mysql/bindutils.cpp:356: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(static_cast<char*>(bind.buffer), data, length + 1);
data/tntdb-1.3/src/mysql/bindutils.cpp:367: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(static_cast<char*>(bind.buffer), data.data(), length);
data/tntdb-1.3/src/mysql/connection.cpp:56:22:  [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).
    void Connection::open(const char* app, const char* host, const char* user,
data/tntdb-1.3/src/mysql/connection.cpp:88: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).
      open(app, host, user, passwd, db, port, unix_socket, client_flag);
data/tntdb-1.3/src/mysql/connection.cpp:235: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).
      open(app.c_str(), host.c_str(), user.c_str(), passwd.c_str(), db.c_str(),
data/tntdb-1.3/src/oracle/connection.cpp:322: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 version[64];
data/tntdb-1.3/src/oracle/error.cpp:45: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 errbuf[512];
data/tntdb-1.3/src/oracle/number.cpp:103:7:  [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[64];
data/tntdb-1.3/src/time.cpp:67: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 ret[14];
data/tntdb-1.3/src/mysql/bindutils.cpp:354: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).
      length = ::strlen(data);

ANALYSIS SUMMARY:

Hits = 19
Lines analyzed = 23302 in approximately 0.63 seconds (37135 lines/second)
Physical Source Lines of Code (SLOC) = 14394
Hits@level = [0]   0 [1]   1 [2]  15 [3]   3 [4]   0 [5]   0
Hits@level+ = [0+]  19 [1+]  19 [2+]  18 [3+]   3 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 1.31999 [1+] 1.31999 [2+] 1.25052 [3+] 0.20842 [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.