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/soci-4.0.0/include/private/firebird/error-firebird.h Examining data/soci-4.0.0/include/private/firebird/common.h Examining data/soci-4.0.0/include/private/soci-compiler.h Examining data/soci-4.0.0/include/private/soci-cpp.h Examining data/soci-4.0.0/include/private/soci-cstrtod.h Examining data/soci-4.0.0/include/private/soci-dtocstr.h Examining data/soci-4.0.0/include/private/soci-exchange-cast.h Examining data/soci-4.0.0/include/private/soci-mktime.h Examining data/soci-4.0.0/include/private/soci-static-assert.h Examining data/soci-4.0.0/include/soci/backend-loader.h Examining data/soci-4.0.0/include/soci/bind-values.h Examining data/soci-4.0.0/include/soci/blob-exchange.h Examining data/soci-4.0.0/include/soci/blob.h Examining data/soci-4.0.0/include/soci/boost-fusion.h Examining data/soci-4.0.0/include/soci/boost-gregorian-date.h Examining data/soci-4.0.0/include/soci/boost-optional.h Examining data/soci-4.0.0/include/soci/boost-tuple.h Examining data/soci-4.0.0/include/soci/callbacks.h Examining data/soci-4.0.0/include/soci/column-info.h Examining data/soci-4.0.0/include/soci/connection-parameters.h Examining data/soci-4.0.0/include/soci/connection-pool.h Examining data/soci-4.0.0/include/soci/db2/soci-db2.h Examining data/soci-4.0.0/include/soci/empty/soci-empty.h Examining data/soci-4.0.0/include/soci/error.h Examining data/soci-4.0.0/include/soci/exchange-traits.h Examining data/soci-4.0.0/include/soci/firebird/soci-firebird.h Examining data/soci-4.0.0/include/soci/into-type.h Examining data/soci-4.0.0/include/soci/into.h Examining data/soci-4.0.0/include/soci/logger.h Examining data/soci-4.0.0/include/soci/mysql/soci-mysql.h Examining data/soci-4.0.0/include/soci/noreturn.h Examining data/soci-4.0.0/include/soci/odbc/soci-odbc.h Examining data/soci-4.0.0/include/soci/once-temp-type.h Examining data/soci-4.0.0/include/soci/oracle/soci-oracle.h Examining data/soci-4.0.0/include/soci/postgresql/soci-postgresql.h Examining data/soci-4.0.0/include/soci/prepare-temp-type.h Examining data/soci-4.0.0/include/soci/procedure.h Examining data/soci-4.0.0/include/soci/query_transformation.h Examining data/soci-4.0.0/include/soci/ref-counted-prepare-info.h Examining data/soci-4.0.0/include/soci/ref-counted-statement.h Examining data/soci-4.0.0/include/soci/row-exchange.h Examining data/soci-4.0.0/include/soci/row.h Examining data/soci-4.0.0/include/soci/rowid-exchange.h Examining data/soci-4.0.0/include/soci/rowid.h Examining data/soci-4.0.0/include/soci/rowset.h Examining data/soci-4.0.0/include/soci/session.h Examining data/soci-4.0.0/include/soci/soci-backend.h Examining data/soci-4.0.0/include/soci/soci-platform.h Examining data/soci-4.0.0/include/soci/soci-simple.h Examining data/soci-4.0.0/include/soci/soci.h Examining data/soci-4.0.0/include/soci/sqlite3/soci-sqlite3.h Examining data/soci-4.0.0/include/soci/statement.h Examining data/soci-4.0.0/include/soci/transaction.h Examining data/soci-4.0.0/include/soci/type-conversion-traits.h Examining data/soci-4.0.0/include/soci/type-conversion.h Examining data/soci-4.0.0/include/soci/type-holder.h Examining data/soci-4.0.0/include/soci/type-ptr.h Examining data/soci-4.0.0/include/soci/type-wrappers.h Examining data/soci-4.0.0/include/soci/unsigned-types.h Examining data/soci-4.0.0/include/soci/use-type.h Examining data/soci-4.0.0/include/soci/use.h Examining data/soci-4.0.0/include/soci/values-exchange.h Examining data/soci-4.0.0/include/soci/values.h Examining data/soci-4.0.0/include/soci/version.h Examining data/soci-4.0.0/src/backends/db2/blob.cpp Examining data/soci-4.0.0/src/backends/db2/common.h Examining data/soci-4.0.0/src/backends/db2/factory.cpp Examining data/soci-4.0.0/src/backends/db2/row-id.cpp Examining data/soci-4.0.0/src/backends/db2/session.cpp Examining data/soci-4.0.0/src/backends/db2/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/db2/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/db2/statement.cpp Examining data/soci-4.0.0/src/backends/db2/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/db2/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/empty/blob.cpp Examining data/soci-4.0.0/src/backends/empty/factory.cpp Examining data/soci-4.0.0/src/backends/empty/row-id.cpp Examining data/soci-4.0.0/src/backends/empty/session.cpp Examining data/soci-4.0.0/src/backends/empty/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/empty/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/empty/statement.cpp Examining data/soci-4.0.0/src/backends/empty/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/empty/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/firebird/blob.cpp Examining data/soci-4.0.0/src/backends/firebird/factory.cpp Examining data/soci-4.0.0/src/backends/firebird/session.cpp Examining data/soci-4.0.0/src/backends/firebird/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/firebird/statement.cpp Examining data/soci-4.0.0/src/backends/firebird/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/firebird/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/firebird/common.cpp Examining data/soci-4.0.0/src/backends/firebird/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/firebird/error-firebird.cpp Examining data/soci-4.0.0/src/backends/mysql/blob.cpp Examining data/soci-4.0.0/src/backends/mysql/common.cpp Examining data/soci-4.0.0/src/backends/mysql/common.h Examining data/soci-4.0.0/src/backends/mysql/factory.cpp Examining data/soci-4.0.0/src/backends/mysql/row-id.cpp Examining data/soci-4.0.0/src/backends/mysql/session.cpp Examining data/soci-4.0.0/src/backends/mysql/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/mysql/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/mysql/statement.cpp Examining data/soci-4.0.0/src/backends/mysql/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/mysql/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/odbc/blob.cpp Examining data/soci-4.0.0/src/backends/odbc/factory.cpp Examining data/soci-4.0.0/src/backends/odbc/row-id.cpp Examining data/soci-4.0.0/src/backends/odbc/session.cpp Examining data/soci-4.0.0/src/backends/odbc/statement.cpp Examining data/soci-4.0.0/src/backends/odbc/utility.h Examining data/soci-4.0.0/src/backends/odbc/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/odbc/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/odbc/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/odbc/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/oracle/blob.cpp Examining data/soci-4.0.0/src/backends/oracle/error.cpp Examining data/soci-4.0.0/src/backends/oracle/error.h Examining data/soci-4.0.0/src/backends/oracle/factory.cpp Examining data/soci-4.0.0/src/backends/oracle/row-id.cpp Examining data/soci-4.0.0/src/backends/oracle/session.cpp Examining data/soci-4.0.0/src/backends/oracle/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/oracle/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/oracle/statement.cpp Examining data/soci-4.0.0/src/backends/oracle/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/oracle/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/postgresql/blob.cpp Examining data/soci-4.0.0/src/backends/postgresql/common.h Examining data/soci-4.0.0/src/backends/postgresql/error.cpp Examining data/soci-4.0.0/src/backends/postgresql/factory.cpp Examining data/soci-4.0.0/src/backends/postgresql/row-id.cpp Examining data/soci-4.0.0/src/backends/postgresql/session.cpp Examining data/soci-4.0.0/src/backends/postgresql/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/postgresql/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/postgresql/statement.cpp Examining data/soci-4.0.0/src/backends/postgresql/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/postgresql/vector-use-type.cpp Examining data/soci-4.0.0/src/backends/sqlite3/blob.cpp Examining data/soci-4.0.0/src/backends/sqlite3/common.h Examining data/soci-4.0.0/src/backends/sqlite3/error.cpp Examining data/soci-4.0.0/src/backends/sqlite3/factory.cpp Examining data/soci-4.0.0/src/backends/sqlite3/row-id.cpp Examining data/soci-4.0.0/src/backends/sqlite3/session.cpp Examining data/soci-4.0.0/src/backends/sqlite3/standard-into-type.cpp Examining data/soci-4.0.0/src/backends/sqlite3/standard-use-type.cpp Examining data/soci-4.0.0/src/backends/sqlite3/statement.cpp Examining data/soci-4.0.0/src/backends/sqlite3/vector-into-type.cpp Examining data/soci-4.0.0/src/backends/sqlite3/vector-use-type.cpp Examining data/soci-4.0.0/src/core/backend-loader.cpp Examining data/soci-4.0.0/src/core/blob.cpp Examining data/soci-4.0.0/src/core/common.cpp Examining data/soci-4.0.0/src/core/connection-parameters.cpp Examining data/soci-4.0.0/src/core/connection-pool.cpp Examining data/soci-4.0.0/src/core/error.cpp Examining data/soci-4.0.0/src/core/into-type.cpp Examining data/soci-4.0.0/src/core/logger.cpp Examining data/soci-4.0.0/src/core/once-temp-type.cpp Examining data/soci-4.0.0/src/core/prepare-temp-type.cpp Examining data/soci-4.0.0/src/core/procedure.cpp Examining data/soci-4.0.0/src/core/ref-counted-prepare-info.cpp Examining data/soci-4.0.0/src/core/ref-counted-statement.cpp Examining data/soci-4.0.0/src/core/row.cpp Examining data/soci-4.0.0/src/core/rowid.cpp Examining data/soci-4.0.0/src/core/session.cpp Examining data/soci-4.0.0/src/core/soci-simple.cpp Examining data/soci-4.0.0/src/core/statement.cpp Examining data/soci-4.0.0/src/core/transaction.cpp Examining data/soci-4.0.0/src/core/use-type.cpp Examining data/soci-4.0.0/src/core/values.cpp Examining data/soci-4.0.0/tests/catch.hpp Examining data/soci-4.0.0/tests/common-tests.h Examining data/soci-4.0.0/tests/db2/test-db2.cpp Examining data/soci-4.0.0/tests/empty/test-empty.cpp Examining data/soci-4.0.0/tests/firebird/test-firebird.cpp Examining data/soci-4.0.0/tests/mysql/test-mysql.cpp Examining data/soci-4.0.0/tests/mysql/test-mysql.h Examining data/soci-4.0.0/tests/odbc/test-odbc-access.cpp Examining data/soci-4.0.0/tests/odbc/test-odbc-db2.cpp Examining data/soci-4.0.0/tests/odbc/test-odbc-mssql.cpp Examining data/soci-4.0.0/tests/odbc/test-odbc-mysql.cpp Examining data/soci-4.0.0/tests/odbc/test-odbc-postgresql.cpp Examining data/soci-4.0.0/tests/oracle/test-oracle.cpp Examining data/soci-4.0.0/tests/postgresql/test-postgresql.cpp Examining data/soci-4.0.0/tests/sqlite3/test-sqlite3.cpp FINAL RESULTS: data/soci-4.0.0/include/private/soci-cstrtod.h:54:9: [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(buf, s); data/soci-4.0.0/include/soci/odbc/soci-odbc.h:427:13: [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(reinterpret_cast<char*>(message_), socierror); data/soci-4.0.0/include/soci/soci-platform.h:43:10: [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. # define vsnprintf _vsnprintf data/soci-4.0.0/include/soci/soci-platform.h:48:10: [4] (format) snprintf: 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. # define snprintf _snprintf data/soci-4.0.0/include/soci/soci-platform.h:48:19: [4] (format) _snprintf: 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. # define snprintf _snprintf data/soci-4.0.0/src/backends/mysql/standard-use-type.cpp:114:22: [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). std::strcpy(buf_, s.c_str()); data/soci-4.0.0/src/backends/mysql/vector-use-type.cpp:147:26: [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). std::strcpy(buf, s.c_str()); data/soci-4.0.0/src/backends/oracle/session.cpp:218:18: [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). std::strcpy(nlsService, serviceName.c_str()); data/soci-4.0.0/src/backends/oracle/session.cpp:228:18: [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). std::strcpy(nlsUserName, userName.c_str()); data/soci-4.0.0/src/backends/oracle/session.cpp:238:18: [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). std::strcpy(nlsPassword, password.c_str()); data/soci-4.0.0/src/backends/oracle/standard-use-type.cpp:30:9: [4] (format) snprintf: 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. #define snprintf _snprintf data/soci-4.0.0/src/backends/oracle/standard-use-type.cpp:30:18: [4] (format) _snprintf: 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. #define snprintf _snprintf data/soci-4.0.0/src/backends/oracle/vector-use-type.cpp:20:9: [4] (format) snprintf: 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. #define snprintf _snprintf data/soci-4.0.0/src/backends/oracle/vector-use-type.cpp:20:18: [4] (format) _snprintf: 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. #define snprintf _snprintf data/soci-4.0.0/src/backends/postgresql/standard-use-type.cpp:197:10: [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). std::strcpy(buf_, s.c_str()); data/soci-4.0.0/src/backends/postgresql/vector-use-type.cpp:98:26: [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). std::strcpy(buf, v[i].c_str()); data/soci-4.0.0/src/backends/postgresql/vector-use-type.cpp:158:26: [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). std::strcpy(buf, s.c_str()); data/soci-4.0.0/src/backends/postgresql/vector-use-type.cpp:182:26: [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). std::strcpy(buf, v[i].value.c_str()); data/soci-4.0.0/src/backends/postgresql/vector-use-type.cpp:192:26: [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). std::strcpy(buf, v[i].value.c_str()); data/soci-4.0.0/tests/firebird/test-firebird.cpp:95:9: [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(b1, msg); data/soci-4.0.0/tests/firebird/test-firebird.cpp:109:9: [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(buf1, msg); data/soci-4.0.0/tests/firebird/test-firebird.cpp:144:14: [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). std::strcpy(buf, buf_str.c_str()); data/soci-4.0.0/src/core/backend-loader.cpp:32:17: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define LOCK(x) EnterCriticalSection(x) data/soci-4.0.0/src/core/backend-loader.cpp:34:23: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. #define MUTEX_INIT(x) InitializeCriticalSection(x) data/soci-4.0.0/src/core/backend-loader.cpp:39:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. #define DLOPEN(x) LoadLibrary(x) data/soci-4.0.0/src/core/backend-loader.cpp:107:35: [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 const* const penv = std::getenv("SOCI_BACKENDS_PATH"); data/soci-4.0.0/src/core/connection-pool.cpp:223:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&(pimpl_->mtx_)); data/soci-4.0.0/src/core/connection-pool.cpp:257:9: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&(pimpl_->mtx_)); data/soci-4.0.0/src/core/connection-pool.cpp:288:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&(pimpl_->mtx_)); data/soci-4.0.0/tests/catch.hpp:8653:18: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. std::srand( config.rngSeed() ); data/soci-4.0.0/tests/common-tests.h:306:18: [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. if (std::getenv("SOCI_TEST_USE_LC_ALL")) data/soci-4.0.0/include/private/firebird/common.h:136:18: [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(var->sqldata, &tmp, sizeof(short)); data/soci-4.0.0/include/private/firebird/common.h:142:18: [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(var->sqldata, &tmp, sizeof(int)); data/soci-4.0.0/include/private/firebird/common.h:148:18: [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(var->sqldata, &tmp, sizeof(long long)); data/soci-4.0.0/include/private/firebird/common.h:154:18: [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(var->sqldata, &sql_value, sizeof(float)); data/soci-4.0.0/include/private/firebird/common.h:160:18: [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(var->sqldata, &sql_value, sizeof(double)); data/soci-4.0.0/include/private/firebird/common.h:175: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(val, &t1, sizeof(t1)); data/soci-4.0.0/include/private/firebird/common.h:177: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(val, &t2, sizeof(t2)); data/soci-4.0.0/include/private/soci-dtocstr.h:36: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[bufSize]; data/soci-4.0.0/include/soci/firebird/soci-firebird.h:293:18: [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). virtual void open(); data/soci-4.0.0/include/soci/odbc/soci-odbc.h:430:13: [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(reinterpret_cast<char*>(sqlstate_), "01000"); data/soci-4.0.0/include/soci/postgresql/soci-postgresql.h:44: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 sqlstate_[ 5 ]; // not std::string to keep copy-constructor no-throw data/soci-4.0.0/include/soci/session.h:60:10: [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(connection_parameters const & parameters); data/soci-4.0.0/include/soci/session.h:61:10: [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(backend_factory const & factory, std::string const & connectString); data/soci-4.0.0/include/soci/session.h:62:10: [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(std::string const & backendName, std::string const & connectString); data/soci-4.0.0/include/soci/session.h:63:10: [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(std::string const & connectString); data/soci-4.0.0/src/backends/db2/vector-use-type.cpp:155:17: [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(pos, v[i].c_str(), v[i].length()); data/soci-4.0.0/src/backends/firebird/blob.cpp:29: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). open(); data/soci-4.0.0/src/backends/firebird/blob.cpp:132:29: [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 firebird_blob_backend::open() data/soci-4.0.0/src/backends/firebird/blob.cpp:179: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). open(); data/soci-4.0.0/src/backends/firebird/blob.cpp:279: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 res_buffer[20], *p, item; data/soci-4.0.0/src/backends/firebird/common.cpp:112:18: [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(buf_, &sz, sizeof(short)); data/soci-4.0.0/src/backends/firebird/common.cpp:113:18: [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(buf_ + sizeof(short), s, sz); data/soci-4.0.0/src/backends/firebird/common.cpp:117:18: [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(buf_, s, sz); data/soci-4.0.0/src/backends/firebird/common.cpp:161: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(buf_, &t, sizeof(t)); data/soci-4.0.0/src/backends/firebird/common.cpp:176: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(buf_, &t, sizeof(t)); data/soci-4.0.0/src/backends/firebird/error-firebird.cpp:39: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_buffer[SOCI_FIREBIRD_ERRMSG]; data/soci-4.0.0/src/backends/firebird/standard-use-type.cpp:147:17: [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(buf_, &blob->bid_, var->sqllen); data/soci-4.0.0/src/backends/firebird/standard-use-type.cpp:169: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(buf_, &blob_->bid_, sizeof(blob_->bid_)); data/soci-4.0.0/src/backends/firebird/statement.cpp:155: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 res_buffer[8]; data/soci-4.0.0/src/backends/firebird/statement.cpp:574: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 res_buffer[256]; data/soci-4.0.0/src/backends/mysql/session.cpp:220:26: [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). *port = std::atoi(val.c_str()); data/soci-4.0.0/src/backends/mysql/session.cpp:273:34: [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). *local_infile = std::atoi(val.c_str()); data/soci-4.0.0/src/backends/mysql/standard-use-type.cpp:47:14: [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. std::strcpy(buf_, "NULL"); data/soci-4.0.0/src/backends/mysql/vector-use-type.cpp:57:18: [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. std::strcpy(buf, "NULL"); data/soci-4.0.0/src/backends/odbc/session.cpp:114: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 product_ver[1024]; data/soci-4.0.0/src/backends/odbc/session.cpp:381: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 product_name[1024]; data/soci-4.0.0/src/backends/odbc/standard-use-type.cpp:151: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(buf_, s.c_str(), size); data/soci-4.0.0/src/backends/odbc/vector-use-type.cpp:182:17: [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(pos, v[i].c_str(), v[i].length()); data/soci-4.0.0/src/backends/oracle/session.cpp:136: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 nlsService[nlsBufLen]; data/soci-4.0.0/src/backends/oracle/session.cpp:138: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 nlsUserName[nlsBufLen]; data/soci-4.0.0/src/backends/oracle/session.cpp:140: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 nlsPassword[nlsBufLen]; data/soci-4.0.0/src/backends/postgresql/error.cpp:21:10: [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(sqlstate_, sqlst, 5); data/soci-4.0.0/src/backends/postgresql/session.cpp:122: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 nameBuf[20] = { 0 }; // arbitrary length data/soci-4.0.0/src/backends/postgresql/session.cpp:123: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(nameBuf, "st_%d", ++statementCount_); data/soci-4.0.0/src/backends/sqlite3/blob.cpp:48: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(buf, buf_ + offset, r); data/soci-4.0.0/src/backends/sqlite3/blob.cpp:69:9: [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(buf_, oldBuf, oldLen); data/soci-4.0.0/src/backends/sqlite3/blob.cpp:72: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(buf_ + offset, buf, toWrite); data/soci-4.0.0/src/backends/sqlite3/blob.cpp:85: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(buf_, oldBuf, len_); data/soci-4.0.0/src/backends/sqlite3/blob.cpp:87: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(buf_ + len_, buf, toWrite); data/soci-4.0.0/src/backends/sqlite3/blob.cpp:104: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(buf_, oldBuf, len_); data/soci-4.0.0/src/backends/sqlite3/statement.cpp:166:29: [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.buffer_.data_, sqlite3_column_text(stmt_, c), col.buffer_.size_+1); data/soci-4.0.0/src/backends/sqlite3/statement.cpp:185:29: [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.buffer_.data_, sqlite3_column_blob(stmt_, c), col.buffer_.size_); data/soci-4.0.0/src/core/session.cpp:90:5: [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(lastConnectParameters_); data/soci-4.0.0/src/core/session.cpp:101:5: [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(lastConnectParameters_); data/soci-4.0.0/src/core/session.cpp:112:5: [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(lastConnectParameters_); data/soci-4.0.0/src/core/session.cpp:122:5: [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(lastConnectParameters_); data/soci-4.0.0/src/core/session.cpp:151: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). void session::open(connection_parameters const & parameters) data/soci-4.0.0/src/core/session.cpp:155:34: [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). pool_->at(poolPosition_).open(parameters); data/soci-4.0.0/src/core/session.cpp:175: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). void session::open(backend_factory const & factory, data/soci-4.0.0/src/core/session.cpp:178:5: [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(connection_parameters(factory, connectString)); data/soci-4.0.0/src/core/session.cpp:181: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). void session::open(std::string const & backendName, data/soci-4.0.0/src/core/session.cpp:184:5: [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(connection_parameters(backendName, connectString)); data/soci-4.0.0/src/core/session.cpp:187: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). void session::open(std::string const & connectString) data/soci-4.0.0/src/core/session.cpp:189:5: [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(connection_parameters(connectString)); data/soci-4.0.0/src/core/soci-simple.cpp:51: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). wrapper->sql.open(connection_string); data/soci-4.0.0/src/core/soci-simple.cpp:345: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 date_formatted[80]; data/soci-4.0.0/src/core/soci-simple.cpp:687: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. std::sprintf(wrapper.date_formatted, "%d %d %d %d %d %d", data/soci-4.0.0/src/core/soci-simple.cpp:1798: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. std::sprintf(wrapper->date_formatted, "%d %d %d %d %d %d", data/soci-4.0.0/src/core/use-type.cpp:84:17: [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[80]; data/soci-4.0.0/tests/catch.hpp:1594:23: [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. struct TrueType { char sizer[1]; }; data/soci-4.0.0/tests/catch.hpp:1595:24: [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. struct FalseType { char sizer[2]; }; data/soci-4.0.0/tests/catch.hpp:3185: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 storage[sizeof(T)]; data/soci-4.0.0/tests/catch.hpp:6161: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() { data/soci-4.0.0/tests/catch.hpp:6255:17: [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(); data/soci-4.0.0/tests/catch.hpp:6301:26: [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). tracker->open(); data/soci-4.0.0/tests/catch.hpp:6490:16: [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 altStackMem[SIGSTKSZ]; data/soci-4.0.0/tests/catch.hpp:7084:35: [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 **utf8Argv = new char *[ argc ]; data/soci-4.0.0/tests/catch.hpp:7584: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 data[bufferSize]; data/soci-4.0.0/tests/catch.hpp:7621: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). m_ofs.open( filename.c_str() ); data/soci-4.0.0/tests/catch.hpp:8856:21: [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 asChar[sizeof (int)]; data/soci-4.0.0/tests/catch.hpp:9491: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 buffer[maxDoubleSize]; data/soci-4.0.0/tests/catch.hpp:9498:13: [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, "%.3f", duration); data/soci-4.0.0/tests/catch.hpp:9724:16: [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 line[CATCH_CONFIG_CONSOLE_WIDTH] = {0}; data/soci-4.0.0/tests/catch.hpp:10304: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 timeStamp[timeStampSize]; data/soci-4.0.0/tests/common-tests.h:3291:13: [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). sql.open(backEndFactory_, connectString_); data/soci-4.0.0/tests/common-tests.h:3300:17: [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). sql.open(backEndFactory_, connectString_); data/soci-4.0.0/tests/common-tests.h:3312:13: [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). sql.open(backEndFactory_, connectString_); data/soci-4.0.0/tests/common-tests.h:3699:13: [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). sql.open(backEndFactory_, connectString_); data/soci-4.0.0/tests/common-tests.h:3851:13: [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). sql.open(backEndFactory_, connectString_); data/soci-4.0.0/tests/common-tests.h:3954:13: [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). sql.open(backEndFactory_, connectString_); data/soci-4.0.0/tests/firebird/test-firebird.cpp:92: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 buf1[100], buf2[100], buf3[100]; data/soci-4.0.0/tests/firebird/test-firebird.cpp:108: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 buf1[100], buf2[100], buf3[100]; data/soci-4.0.0/tests/firebird/test-firebird.cpp:141: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 buf[20]; data/soci-4.0.0/tests/firebird/test-firebird.cpp:328: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 buf[4]; data/soci-4.0.0/tests/firebird/test-firebird.cpp:540: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 str2[20]; data/soci-4.0.0/tests/firebird/test-firebird.cpp:967: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 cnt_req[2], cnt_info[128]; data/soci-4.0.0/tests/odbc/test-odbc-postgresql.cpp:50: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[128]; data/soci-4.0.0/tests/odbc/test-odbc-postgresql.cpp:53: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. std::sprintf(buf, "%u.%02u.%04u", major_, minor_, release_); data/soci-4.0.0/tests/odbc/test-odbc-postgresql.cpp:234: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 driver_ver[1024]; data/soci-4.0.0/tests/oracle/test-oracle.cpp:46: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 buf[25]; data/soci-4.0.0/tests/oracle/test-oracle.cpp:77: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 buf[25]; data/soci-4.0.0/tests/oracle/test-oracle.cpp:161: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 buf2[100]; data/soci-4.0.0/tests/oracle/test-oracle.cpp:208: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 buf2[100]; data/soci-4.0.0/tests/postgresql/test-postgresql.cpp:178: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 buf2[100]; data/soci-4.0.0/tests/postgresql/test-postgresql.cpp:217: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 buf2[100]; data/soci-4.0.0/tests/sqlite3/test-sqlite3.cpp:98: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 buf2[100]; data/soci-4.0.0/include/private/soci-cstrtod.h:52: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 const bufSize = strlen(s) + 1; data/soci-4.0.0/include/soci/blob.h:35:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char * buf, std::size_t toRead); data/soci-4.0.0/include/soci/db2/soci-db2.h:241:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char* buf, std::size_t toRead) SOCI_OVERRIDE; data/soci-4.0.0/include/soci/empty/soci-empty.h:148:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char* buf, std::size_t toRead) SOCI_OVERRIDE; data/soci-4.0.0/include/soci/firebird/soci-firebird.h:263:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char *buf, data/soci-4.0.0/include/soci/mysql/soci-mysql.h:222:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char *buf, data/soci-4.0.0/include/soci/odbc/soci-odbc.h:297:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char *buf, data/soci-4.0.0/include/soci/oracle/soci-oracle.h:281:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char *buf, data/soci-4.0.0/include/soci/oracle/soci-oracle.h:287:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(offset + 1, buf, toRead); data/soci-4.0.0/include/soci/postgresql/soci-postgresql.h:337:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char * buf, data/soci-4.0.0/include/soci/postgresql/soci-postgresql.h:343:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(offset, buf, toRead); data/soci-4.0.0/include/soci/soci-backend.h:230:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual std::size_t read(std::size_t offset, char* buf, data/soci-4.0.0/include/soci/sqlite3/soci-sqlite3.h:265:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t read(std::size_t offset, char *buf, data/soci-4.0.0/src/backends/db2/blob.cpp:37:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t db2_blob_backend::read( data/soci-4.0.0/src/backends/db2/standard-use-type.cpp:74:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s.c_str(), size); data/soci-4.0.0/src/backends/db2/statement.cpp:248:34: [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). columnName.assign(name, std::strlen(name)); data/soci-4.0.0/src/backends/empty/blob.cpp:36:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t empty_blob_backend::read( data/soci-4.0.0/src/backends/firebird/blob.cpp:35:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t firebird_blob_backend::read( data/soci-4.0.0/src/backends/firebird/standard-into-type.cpp:156:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t const len_read = blob.read(0, &out[0], len_total); data/soci-4.0.0/src/backends/mysql/blob.cpp:36:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t mysql_blob_backend::read( data/soci-4.0.0/src/backends/mysql/common.h:44:32: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GCC_WARNING_SUPPRESS(float-equal) data/soci-4.0.0/src/backends/mysql/common.h:48:31: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GCC_WARNING_RESTORE(float-equal) data/soci-4.0.0/src/backends/odbc/blob.cpp:32:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t odbc_blob_backend::read( data/soci-4.0.0/src/backends/odbc/statement.cpp:289:34: [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). columnName.assign(name, std::strlen(name)); data/soci-4.0.0/src/backends/oracle/blob.cpp:56:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t oracle_blob_backend::read( data/soci-4.0.0/src/backends/oracle/standard-use-type.cpp:366:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf_, s.c_str(), toCopy); data/soci-4.0.0/src/backends/oracle/standard-use-type.cpp:492:44: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GCC_WARNING_SUPPRESS(float-equal) data/soci-4.0.0/src/backends/oracle/standard-use-type.cpp:499:43: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GCC_WARNING_RESTORE(float-equal) data/soci-4.0.0/src/backends/oracle/vector-use-type.cpp:135:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pos, v[begin_ + i].c_str(), v[begin_ + i].length()); data/soci-4.0.0/src/backends/postgresql/blob.cpp:52:38: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t postgresql_blob_backend::read( data/soci-4.0.0/src/backends/postgresql/common.h:34:63: [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 (converted == 1 && static_cast<std::size_t>(n) == std::strlen(buf)) data/soci-4.0.0/src/backends/postgresql/common.h:79:63: [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 (converted == 1 && static_cast<std::size_t>(n) == std::strlen(buf)) data/soci-4.0.0/src/backends/sqlite3/blob.cpp:36:35: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t sqlite3_blob_backend::read( data/soci-4.0.0/src/backends/sqlite3/common.h:43:63: [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 (converted == 1 && static_cast<std::size_t>(n) == std::strlen(buf)) data/soci-4.0.0/src/backends/sqlite3/common.h:67:63: [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 (converted == 1 && static_cast<std::size_t>(n) == std::strlen(buf)) data/soci-4.0.0/src/core/blob.cpp:31:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t blob::read(std::size_t offset, char *buf, std::size_t toRead) data/soci-4.0.0/src/core/blob.cpp:33:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return backEnd_->read(offset, buf, toRead); data/soci-4.0.0/src/core/soci-simple.cpp:195:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return static_cast<int>(blob->blob_.read(offset, buf, toRead)); data/soci-4.0.0/tests/catch.hpp:8577:50: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); data/soci-4.0.0/tests/catch.hpp:8583:50: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); data/soci-4.0.0/tests/common-tests.h:451:32: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GCC_WARNING_SUPPRESS(float-equal) data/soci-4.0.0/tests/common-tests.h:455:31: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. GCC_WARNING_RESTORE(float-equal) data/soci-4.0.0/tests/firebird/test-firebird.cpp:538:26: [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). b.write(0, str1, strlen(str1)); data/soci-4.0.0/tests/firebird/test-firebird.cpp:541:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::size_t i = b.read(3, str2, 2); data/soci-4.0.0/tests/firebird/test-firebird.cpp:548:24: [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). b.append(str3, strlen(str3)); data/soci-4.0.0/tests/firebird/test-firebird.cpp:560:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, &text[0], b.get_len()); data/soci-4.0.0/tests/firebird/test-firebird.cpp:564:26: [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). b.write(7, str1, strlen(str1)); data/soci-4.0.0/tests/firebird/test-firebird.cpp:577:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, &text[0], b.get_len()); data/soci-4.0.0/tests/firebird/test-firebird.cpp:580:26: [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). b.write(0, str1, strlen(str1)); data/soci-4.0.0/tests/firebird/test-firebird.cpp:582:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, &text[0], b.get_len()); data/soci-4.0.0/tests/firebird/test-firebird.cpp:597:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, &text[0], b.get_len()); data/soci-4.0.0/tests/firebird/test-firebird.cpp:602:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, &text[0], b.get_len()); data/soci-4.0.0/tests/firebird/test-firebird.cpp:632:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). br.read(0, data2.data(), br.get_len()); data/soci-4.0.0/tests/mysql/test-mysql.cpp:300:53: [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). CHECK(strncmp(e.what(), expectedPrefix, strlen(expectedPrefix)) == 0); data/soci-4.0.0/tests/oracle/test-oracle.cpp:162:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(1, buf2, 10); data/soci-4.0.0/tests/postgresql/test-postgresql.cpp:179:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, buf2, 10); data/soci-4.0.0/tests/postgresql/test-postgresql.cpp:403: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). CHECK(strncmp(e.what(), expectedPrefix, strlen(expectedPrefix)) == 0); data/soci-4.0.0/tests/postgresql/test-postgresql.cpp:524:16: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. CHECK(std::equal(ids.begin(), ids.end(), ids2.begin())); data/soci-4.0.0/tests/sqlite3/test-sqlite3.cpp:99:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b.read(0, buf2, 10); ANALYSIS SUMMARY: Hits = 196 Lines analyzed = 55193 in approximately 1.02 seconds (53930 lines/second) Physical Source Lines of Code (SLOC) = 41968 Hits@level = [0] 52 [1] 59 [2] 106 [3] 9 [4] 22 [5] 0 Hits@level+ = [0+] 248 [1+] 196 [2+] 137 [3+] 31 [4+] 22 [5+] 0 Hits/KSLOC@level+ = [0+] 5.90926 [1+] 4.67022 [2+] 3.26439 [3+] 0.738658 [4+] 0.524209 [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.