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/leatherman-1.12.1+dfsg/curl/inc/leatherman/curl/client.hpp
Examining data/leatherman-1.12.1+dfsg/curl/inc/leatherman/curl/request.hpp
Examining data/leatherman-1.12.1+dfsg/curl/inc/leatherman/curl/response.hpp
Examining data/leatherman-1.12.1+dfsg/curl/src/client.cc
Examining data/leatherman-1.12.1+dfsg/curl/src/request.cc
Examining data/leatherman-1.12.1+dfsg/curl/src/response.cc
Examining data/leatherman-1.12.1+dfsg/curl/tests/client_test.cc
Examining data/leatherman-1.12.1+dfsg/curl/tests/fixtures.cc
Examining data/leatherman-1.12.1+dfsg/curl/tests/fixtures.hpp
Examining data/leatherman-1.12.1+dfsg/curl/tests/mock_curl.cc
Examining data/leatherman-1.12.1+dfsg/curl/tests/mock_curl.hpp
Examining data/leatherman-1.12.1+dfsg/curl/tests/request_test.cc
Examining data/leatherman-1.12.1+dfsg/curl/tests/response_test.cc
Examining data/leatherman-1.12.1+dfsg/dynamic_library/inc/leatherman/dynamic_library/dynamic_library.hpp
Examining data/leatherman-1.12.1+dfsg/dynamic_library/src/dynamic_library.cc
Examining data/leatherman-1.12.1+dfsg/dynamic_library/src/posix/dynamic_library.cc
Examining data/leatherman-1.12.1+dfsg/dynamic_library/src/windows/dynamic_library.cc
Examining data/leatherman-1.12.1+dfsg/dynamic_library/tests/dynamic_library_tests.cc
Examining data/leatherman-1.12.1+dfsg/dynamic_library/tests/test-lib/goodbye.cc
Examining data/leatherman-1.12.1+dfsg/dynamic_library/tests/test-lib/hello.cc
Examining data/leatherman-1.12.1+dfsg/execution/inc/leatherman/execution/execution.hpp
Examining data/leatherman-1.12.1+dfsg/execution/src/execution.cc
Examining data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc
Examining data/leatherman-1.12.1+dfsg/execution/src/posix/generic/platform.cc
Examining data/leatherman-1.12.1+dfsg/execution/src/posix/platform.hpp
Examining data/leatherman-1.12.1+dfsg/execution/src/posix/solaris/platform.cc
Examining data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc
Examining data/leatherman-1.12.1+dfsg/execution/tests/log_capture.cc
Examining data/leatherman-1.12.1+dfsg/execution/tests/log_capture.hpp
Examining data/leatherman-1.12.1+dfsg/execution/tests/lth_cat.cc
Examining data/leatherman-1.12.1+dfsg/execution/tests/lth_cat.hpp
Examining data/leatherman-1.12.1+dfsg/execution/tests/posix/execution.cc
Examining data/leatherman-1.12.1+dfsg/execution/tests/posix/solaris/execution.cc
Examining data/leatherman-1.12.1+dfsg/execution/tests/windows/execution.cc
Examining data/leatherman-1.12.1+dfsg/file_util/inc/leatherman/file_util/directory.hpp
Examining data/leatherman-1.12.1+dfsg/file_util/inc/leatherman/file_util/file.hpp
Examining data/leatherman-1.12.1+dfsg/file_util/src/directory.cc
Examining data/leatherman-1.12.1+dfsg/file_util/src/file.cc
Examining data/leatherman-1.12.1+dfsg/file_util/tests/directory_utils_test.cc
Examining data/leatherman-1.12.1+dfsg/file_util/tests/file_utils_test.cc
Examining data/leatherman-1.12.1+dfsg/file_util/tests/fixtures.cc
Examining data/leatherman-1.12.1+dfsg/file_util/tests/fixtures.hpp
Examining data/leatherman-1.12.1+dfsg/json_container/inc/leatherman/json_container/json_container.hpp
Examining data/leatherman-1.12.1+dfsg/json_container/src/json_container.cc
Examining data/leatherman-1.12.1+dfsg/json_container/tests/json_container_test.cc
Examining data/leatherman-1.12.1+dfsg/locale/disabled/locale.cc
Examining data/leatherman-1.12.1+dfsg/locale/inc/leatherman/locale/locale.hpp
Examining data/leatherman-1.12.1+dfsg/locale/src/locale.cc
Examining data/leatherman-1.12.1+dfsg/locale/tests/format.cc
Examining data/leatherman-1.12.1+dfsg/locale/tests/locale.cc
Examining data/leatherman-1.12.1+dfsg/logging/inc/leatherman/logging/logging.hpp
Examining data/leatherman-1.12.1+dfsg/logging/src/logging.cc
Examining data/leatherman-1.12.1+dfsg/logging/src/posix/logging.cc
Examining data/leatherman-1.12.1+dfsg/logging/src/windows/logging.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/logging.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/logging.hpp
Examining data/leatherman-1.12.1+dfsg/logging/tests/logging_i18n.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/logging_on_message.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/logging_stream.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/logging_stream_lines.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/posix/logging.cc
Examining data/leatherman-1.12.1+dfsg/logging/tests/windows/logging.cc
Examining data/leatherman-1.12.1+dfsg/ruby/inc/leatherman/ruby/api.hpp
Examining data/leatherman-1.12.1+dfsg/ruby/src/api.cc
Examining data/leatherman-1.12.1+dfsg/ruby/src/posix/api.cc
Examining data/leatherman-1.12.1+dfsg/ruby/src/windows/api.cc
Examining data/leatherman-1.12.1+dfsg/ruby/tests/api-test.cc
Examining data/leatherman-1.12.1+dfsg/tests/main.cc
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/environment.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/posix/scoped_descriptor.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/regex.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/scope_exit.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/scoped_env.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/scoped_resource.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/strings.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/time.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/timer.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/uri.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/windows/scoped_handle.hpp
Examining data/leatherman-1.12.1+dfsg/util/inc/leatherman/util/option_set.hpp
Examining data/leatherman-1.12.1+dfsg/util/src/environment.cc
Examining data/leatherman-1.12.1+dfsg/util/src/posix/environment.cc
Examining data/leatherman-1.12.1+dfsg/util/src/posix/scoped_descriptor.cc
Examining data/leatherman-1.12.1+dfsg/util/src/posix/time.cc
Examining data/leatherman-1.12.1+dfsg/util/src/scope_exit.cc
Examining data/leatherman-1.12.1+dfsg/util/src/scoped_env.cc
Examining data/leatherman-1.12.1+dfsg/util/src/strings.cc
Examining data/leatherman-1.12.1+dfsg/util/src/time.cc
Examining data/leatherman-1.12.1+dfsg/util/src/uri.cc
Examining data/leatherman-1.12.1+dfsg/util/src/windows/environment.cc
Examining data/leatherman-1.12.1+dfsg/util/src/windows/scoped_handle.cc
Examining data/leatherman-1.12.1+dfsg/util/src/windows/time.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/environment.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/option_set.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/posix/environment.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/scoped_env.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/strings_test.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/timer.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/uri.cc
Examining data/leatherman-1.12.1+dfsg/util/tests/windows/environment.cc
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/args.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cenv.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/config.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/convert.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cstdio.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cstdlib.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/filebuf.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/integration/filesystem.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/iostream.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/stackstring.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/system.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/utf8_codecvt.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/windows.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/standalone/config.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/standalone/encoding_errors.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/standalone/encoding_utf.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/standalone/scoped_ptr.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/standalone/utf.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/template.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test.hpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_convert.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fs.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_iostream.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_stdio.cpp
Examining data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/file_util.hpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/process.hpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/registry.hpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/system_error.hpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/user.hpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/windows.hpp
Examining data/leatherman-1.12.1+dfsg/windows/inc/leatherman/windows/wmi.hpp
Examining data/leatherman-1.12.1+dfsg/windows/src/file_util.cc
Examining data/leatherman-1.12.1+dfsg/windows/src/process.cc
Examining data/leatherman-1.12.1+dfsg/windows/src/registry.cc
Examining data/leatherman-1.12.1+dfsg/windows/src/system_error.cc
Examining data/leatherman-1.12.1+dfsg/windows/src/user.cc
Examining data/leatherman-1.12.1+dfsg/windows/src/wmi.cc
Examining data/leatherman-1.12.1+dfsg/windows/tests/file_utils_test.cc

FINAL RESULTS:

data/leatherman-1.12.1+dfsg/curl/src/client.cc:115:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/curl/src/client.cc:137:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/curl/src/client.cc:165:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/curl/tests/mock_curl.cc:419:27:  [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).
    new_slist_obj->data = strcpy(new_slist_obj->data, string);
data/leatherman-1.12.1+dfsg/execution/src/execution.cc:286:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:151:24:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        FILE *stream = popen(cmd.c_str(), "r");
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:172:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:61:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/file_util/src/directory.cc:19:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:16:32:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
namespace boost_error = boost::system::errc;
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:58:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/ruby/src/api.cc:526:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        boost::system::error_code ec;
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/system.hpp:19:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
using ::system;
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/system.hpp:28:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
inline int system(char const *cmd)
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp:75:33:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            TEST(boost::nowide::system(command.c_str()) == 0);
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:118:42:  [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.
            auto result = boost::nowide::getenv(home_var);
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:121:42:  [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.
            auto result = boost::nowide::getenv(home_var);
data/leatherman-1.12.1+dfsg/util/src/environment.cc:10:40:  [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.
        auto variable = boost::nowide::getenv(name.c_str());
data/leatherman-1.12.1+dfsg/util/src/environment.cc:25:40:  [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.
        auto variable = boost::nowide::getenv(name.c_str());
data/leatherman-1.12.1+dfsg/util/tests/environment.cc:52:34:  [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.
    REQUIRE_FALSE(boost::nowide::getenv(""));
data/leatherman-1.12.1+dfsg/util/tests/environment.cc:56:36:  [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.
            REQUIRE(boost::nowide::getenv("ENVTEST") == string("FOO"));
data/leatherman-1.12.1+dfsg/util/tests/environment.cc:74:34:  [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.
    REQUIRE_FALSE(boost::nowide::getenv("ENVTEST"));
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cenv.hpp:25:13:  [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.
    using ::getenv;
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cenv.hpp:35: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.
    inline char *getenv(char const *key)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:77:23:  [3] (random) setstate:
  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.
                this->setstate(std::ios_base::failbit);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:94:23:  [3] (random) setstate:
  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.
                this->setstate(std::ios_base::failbit);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:150:23:  [3] (random) setstate:
  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.
                this->setstate(std::ios_base::failbit);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:167:23:  [3] (random) setstate:
  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.
                this->setstate(std::ios_base::failbit);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:223:23:  [3] (random) setstate:
  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.
                this->setstate(std::ios_base::failbit);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:240:23:  [3] (random) setstate:
  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.
                this->setstate(std::ios_base::failbit);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:30: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.
        TEST(boost::nowide::getenv("BOOST_TEST1"));
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:31: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.
        TEST(boost::nowide::getenv("BOOST_TEST1")==example);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:33: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.
        TEST(boost::nowide::getenv("BOOST_TEST1")==example);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:35: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.
        TEST(boost::nowide::getenv("BOOST_TEST2"));
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:36: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.
        TEST(boost::nowide::getenv("BOOST_TEST_INVALID")==0);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:37: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.
        TEST(boost::nowide::getenv("BOOST_TEST2")==example + "x");
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp:25:33:  [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.
            TEST(boost::nowide::getenv("BOOST_NOWIDE_TEST"));
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp:26:33:  [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.
            TEST(boost::nowide::getenv("BOOST_NOWIDE_TEST_NONE") == 0);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp:27:33:  [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.
            TEST(boost::nowide::getenv("BOOST_NOWIDE_TEST")==example);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp:37:31:  [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.
		        TEST(boost::nowide::getenv(key.c_str()));
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_system.cpp:38:37:  [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.
                TEST(boost::nowide::getenv(key.c_str()) == value);
data/leatherman-1.12.1+dfsg/curl/src/client.cc:107:34:  [2] (misc) fopen:
  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).
            _fp = boost::nowide::fopen(_temp_path.string().c_str(), "wb");
data/leatherman-1.12.1+dfsg/curl/src/client.cc:268: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[CURL_ERROR_SIZE] = { '\0' };
data/leatherman-1.12.1+dfsg/curl/src/client.cc:489: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(buffer, body.c_str() + ctx->read_offset, requested);
data/leatherman-1.12.1+dfsg/curl/tests/mock_curl.cc:286: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(h->errbuf, "easy perform failed"); 
data/leatherman-1.12.1+dfsg/curl/tests/mock_curl.cc:296: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[10] = {};
data/leatherman-1.12.1+dfsg/execution/src/execution.cc:281:20:  [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).
        out_stream.open(out_file.c_str(), std::ios::binary);
data/leatherman-1.12.1+dfsg/execution/src/execution.cc:297:24:  [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).
            err_stream.open(err_file.c_str(), std::ios::binary);
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:150: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 buffer[max_buffer];
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:352:22:  [2] (integer) atol:
  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).
                fd = atol(dent.path().filename().c_str());
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:489: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).
            dev_null = scoped_descriptor(open("/dev/null", O_RDWR));
data/leatherman-1.12.1+dfsg/execution/src/posix/generic/platform.cc:17:72:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
        pid_t pid = options[execution_options::thread_safe] ? fork() : vfork();
data/leatherman-1.12.1+dfsg/execution/src/posix/solaris/platform.cc:48:24:  [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 ((tmpl_fd = open(CT_TEMPLATE, O_RDWR)) == -1) {
data/leatherman-1.12.1+dfsg/execution/src/posix/solaris/platform.cc:108:24:  [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 ((stat_fd = open(CT_LATEST, O_RDONLY)) < 0) {
data/leatherman-1.12.1+dfsg/execution/src/posix/solaris/platform.cc:140: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 ((ctl_fd = open((boost::format { "%s/process/%d/ctl" } % CTFS_ROOT % ctid).str().c_str(), O_WRONLY)) < 0) {
data/leatherman-1.12.1+dfsg/execution/src/posix/solaris/platform.cc:170:72:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
        pid_t pid = options[execution_options::thread_safe] ? fork() : vfork();
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:84: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).
        ofs.open(tmp_name.c_str(), mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cenv.hpp:44:9:  [2] (buffer) wchar_t:
  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.
        wchar_t buf[buf_size];
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cenv.hpp:74:13:  [2] (buffer) wchar_t:
  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.
            wchar_t unused[2];
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cstdio.hpp:27:16:  [2] (misc) fopen:
  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).
    using std::fopen;
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/cstdio.hpp:53:14:  [2] (misc) fopen:
  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).
inline FILE *fopen(char const *file_name,char const *mode)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/filebuf.hpp:76:24:  [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).
        basic_filebuf *open(std::string const &s,std::ios_base::openmode mode)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/filebuf.hpp:78:20:  [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 open(s.c_str(),mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/filebuf.hpp:83:24:  [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).
        basic_filebuf *open(char const *s,std::ios_base::openmode mode)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/filebuf.hpp:100:25:  [2] (misc) fopen:
  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).
            FILE *f = ::fopen(s,boost::nowide::convert(smode).c_str());
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:58: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).
            open(file_name,mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:66: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).
            open(file_name,mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:70: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(std::string const &file_name,std::ios_base::openmode mode = std::ios_base::in)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:72: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).
            open(file_name.c_str(),mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:74: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(char const *file_name,std::ios_base::openmode mode = std::ios_base::in)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:76: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(!buf_->open(file_name,mode | std::ios_base::in)) {
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:134: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).
            open(file_name,mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:141: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).
            open(file_name,mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:143: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(std::string const &file_name,std::ios_base::openmode mode = std::ios_base::out)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:145: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).
            open(file_name.c_str(),mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:147: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(char const *file_name,std::ios_base::openmode mode = std::ios_base::out)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:149: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(!buf_->open(file_name,mode | std::ios_base::out)) {
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:207: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).
            open(file_name,mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:214: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).
            open(file_name,mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:216: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(std::string const &file_name,std::ios_base::openmode mode = std::ios_base::out | std::ios_base::out)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:218: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).
            open(file_name.c_str(),mode);
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:220: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(char const *file_name,std::ios_base::openmode mode = std::ios_base::out | std::ios_base::out)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/fstream.hpp:222: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(!buf_->open(file_name,mode)) {
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/stackstring.hpp:41: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(mem_buffer_,other.mem_buffer_,sizeof(output_char) * (len+1));
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/stackstring.hpp:44: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(buffer_,other.buffer_,buffer_size * sizeof(output_char));
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.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 buffer_[buffer_size];
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp:93:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wbuffer_[buffer_size]; // for null
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp:128: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(&tmp[n],&pback_buffer_[0],n);
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp:188: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 buffer_[buffer_size];
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp:189:9:  [2] (buffer) wchar_t:
  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.
        wchar_t wbuffer_[buffer_size]; // for null
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:50:9:  [2] (buffer) wchar_t:
  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.
        wchar_t buf[128];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:103:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:176:9:  [2] (buffer) wchar_t:
  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.
        wchar_t buf[2];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:207: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[32];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:211:9:  [2] (buffer) wchar_t:
  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.
        wchar_t err_buf[3] = { '1' , 0xDC9E }; // second surrogate not works both for UTF-16 and 32
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_convert.cpp:23:13:  [2] (buffer) wchar_t:
  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.
            wchar_t buf[6] = { 0,0,0,0,0,1 };
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_convert.cpp:44: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[10] = {0};
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_convert.cpp:54: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[3];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_convert.cpp:55:13:  [2] (buffer) wchar_t:
  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.
            wchar_t wbuf[3];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:26: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 penv[256] = {0};
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:27:16:  [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).
            fo.open(example);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:46:20:  [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).
                fi.open(example);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:75:20:  [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).
                fi.open(std::string(example));
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:95:20:  [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).
                fi.open(example);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:123: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[16];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:130: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).
            f.open(example,nw::fstream::in | nw::fstream::out | nw::fstream::trunc | nw::fstream::binary);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_stdio.cpp:28:22:  [2] (misc) fopen:
  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).
        FILE *f=std::fopen(example.c_str(),"w");
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_stdio.cpp:35:32:  [2] (misc) fopen:
  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).
        TEST((f=boost::nowide::fopen(example.c_str(),"r"))!=0);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_stdio.cpp:36: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[16];
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_stdio.cpp:45:32:  [2] (misc) fopen:
  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).
        TEST((f=boost::nowide::fopen((example+".1").c_str(),"r"))!=0);
data/leatherman-1.12.1+dfsg/windows/src/user.cc:26:18:  [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.
        unsigned char sid_buffer[SECURITY_MAX_SID_SIZE];
data/leatherman-1.12.1+dfsg/curl/src/client.cc:149:37:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!leatherman::file_util::read(_temp_path.string(), res_body)) {
data/leatherman-1.12.1+dfsg/curl/tests/mock_curl.cc:418:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    new_slist_obj->data = new char[strlen(string) + 1];
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:195:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(true)
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:204:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(false)
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:212:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bool read;
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:231:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                FD_SET(pipe.descriptor, pipe.read ? &read_set : &write_set);
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:236:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (pipe.read) {
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:263:78:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (pipe.descriptor == -1 || !FD_ISSET(pipe.descriptor, pipe.read ? &read_set : &write_set)) {
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:268:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto count = pipe.read ?
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:269:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    read(pipe.descriptor, &pipe.buffer[0], pipe.buffer.size()) :
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:272:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    if (allow_stdin_unread && !pipe.read && errno == EPIPE) {
data/leatherman-1.12.1+dfsg/execution/src/posix/execution.cc:289:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (pipe.read) {
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:229:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(true),
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:241:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            read(false),
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:252:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bool read;
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:290:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    if (pipe.read) {
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:296:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    auto success = pipe.read ?
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:320:30:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                    if (pipe.read) {
data/leatherman-1.12.1+dfsg/execution/src/windows/execution.cc:395:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if (pipe.read) {
data/leatherman-1.12.1+dfsg/file_util/inc/leatherman/file_util/file.hpp:29:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    std::string read(std::string const& path);
data/leatherman-1.12.1+dfsg/file_util/inc/leatherman/file_util/file.hpp:37:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(std::string const& path, std::string& contents);
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:34:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    string read(string const& path) {
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:36:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!read(path, contents)) {
data/leatherman-1.12.1+dfsg/file_util/src/file.cc:42:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(string const& path, string& contents) {
data/leatherman-1.12.1+dfsg/file_util/tests/directory_utils_test.cc:19:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            file_contents.insert(read(path));
data/leatherman-1.12.1+dfsg/file_util/tests/directory_utils_test.cc:31:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return read(path, content);
data/leatherman-1.12.1+dfsg/file_util/tests/file_utils_test.cc:127:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(file.get_file_name()) == "test");
data/leatherman-1.12.1+dfsg/file_util/tests/file_utils_test.cc:149:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read("does_not_exist") == "");
data/leatherman-1.12.1+dfsg/file_util/tests/file_utils_test.cc:150:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE_FALSE(read("does_not_exist", contents));
data/leatherman-1.12.1+dfsg/file_util/tests/file_utils_test.cc:159:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(file_path, contents));
data/leatherman-1.12.1+dfsg/file_util/tests/file_utils_test.cc:161:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        REQUIRE(read(file_path) == "test\n");
data/leatherman-1.12.1+dfsg/ruby/src/api.cc:285:30:  [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).
        return utf8_value(s, strlen(s));
data/leatherman-1.12.1+dfsg/util/src/time.cc:23:35:  [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).
        expiry_time_buffer.resize(strlen(&expiry_time_buffer[0]));
data/leatherman-1.12.1+dfsg/util/src/time.cc:45:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        now_buffer.resize(strlen(&now_buffer[0]));
data/leatherman-1.12.1+dfsg/util/src/windows/environment.cc:54:74:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        for (auto variables = ptr; variables && *variables; variables += wcslen(variables) + 1) {
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/args.hpp:124:73:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                for(wstrings_end = wstrings;*wstrings_end;wstrings_end+=wcslen(wstrings_end)+1)
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/args.hpp:133:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                        p+=strlen(p)+1;
data/leatherman-1.12.1+dfsg/vendor/nowide/include/boost/nowide/filebuf.hpp:257:27:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                int c = ::fgetc(file_);
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp:147:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            size_t n = read();
data/leatherman-1.12.1+dfsg/vendor/nowide/src/iostream.cpp:156:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        size_t read()
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:36:16:  [1] (buffer) wcslen:
  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).
    int wlen = wcslen(wide_name);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:37: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).
    int u8len = strlen(utf8_name);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:95:16:  [1] (buffer) wcslen:
  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).
    int wlen = wcslen(wide_name);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:96: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).
    int u8len = strlen(utf8_name);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:152:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for(int i=1;i<=(int)strlen(utf8_name)+1;i++) {
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:153:29:  [1] (buffer) wcslen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        for(int j=1;j<=(int)wcslen(wide_name)+1;j++) {
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:184:43:  [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).
            char const *from_end = from + strlen(from);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:196:43:  [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).
            char const *from_end = from + strlen(from);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:216:46:  [1] (buffer) wcslen:
  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).
            wchar_t const *from_end = from + wcslen(from);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_codecvt.cpp:227:46:  [1] (buffer) wcslen:
  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).
            wchar_t const *from_end = from + wcslen(from);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_env.cpp:27:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(penv,("BOOST_TEST2=" + example + "x").c_str(),sizeof(penv)-1);
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:35:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                TEST(fgetc(tmp)=='t');
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:36:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                TEST(fgetc(tmp)=='e');
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:37:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                TEST(fgetc(tmp)=='s');
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:38:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                TEST(fgetc(tmp)=='t');
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:39:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                TEST(fgetc(tmp)=='\n');
data/leatherman-1.12.1+dfsg/vendor/nowide/test/test_fstream.cpp:40:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                TEST(fgetc(tmp)==EOF);

ANALYSIS SUMMARY:

Hits = 168
Lines analyzed = 21076 in approximately 0.73 seconds (29034 lines/second)
Physical Source Lines of Code (SLOC) = 14764
Hits@level = [0]   2 [1]  57 [2]  70 [3]  26 [4]  15 [5]   0
Hits@level+ = [0+] 170 [1+] 168 [2+] 111 [3+]  41 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 11.5145 [1+] 11.379 [2+] 7.51829 [3+] 2.77703 [4+] 1.01598 [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.