The following issues were found

src/third_party/boost/boost/archive/iterators/insert_linebreaks.hpp
2 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 23 Column: 24 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{ using ::memcpy; }
#endif

#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/iterator/iterator_traits.hpp>


            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 59 Column: 10 CWE codes: 126
Suggestion: 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

                      CharType
    > super_t;

    bool equal(const insert_linebreaks<Base, N, CharType> & rhs) const {
        return
//            m_count == rhs.m_count
//            && base_reference() == rhs.base_reference()
            this->base_reference() == rhs.base_reference()
        ;

            

Reported by FlawFinder.

src/third_party/abseil-cpp-master/abseil-cpp/absl/status/statusor.cc
2 issues
StrCat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 53 Column: 13 CWE codes: 120

              void Helper::Crash(const absl::Status& status) {
  ABSL_INTERNAL_LOG(
      FATAL,
      absl::StrCat("Attempting to fetch value instead of handling error ",
                   status.ToString()));
}

void ThrowBadStatusOrAccess(absl::Status status) {
#ifdef ABSL_HAVE_EXCEPTIONS

            

Reported by FlawFinder.

StrCat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 63 Column: 13 CWE codes: 120

              #else
  ABSL_INTERNAL_LOG(
      FATAL,
      absl::StrCat("Attempting to fetch value instead of handling error ",
                   status.ToString()));
  std::abort();
#endif
}


            

Reported by FlawFinder.

src/mongo/db/exec/sbe/stages/limit_skip.cpp
2 issues
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?
Security

Line: 63 Column: 22 CWE codes: 362

                  return _children[0]->getAccessor(ctx, slot);
}

void LimitSkipStage::open(bool reOpen) {
    auto optTimer(getOptTimer(_opCtx));

    _commonStats.opens++;
    _isEOF = false;
    _children[0]->open(reOpen);

            

Reported by FlawFinder.

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?
Security

Line: 68 Column: 19 CWE codes: 362

              
    _commonStats.opens++;
    _isEOF = false;
    _children[0]->open(reOpen);

    if (_skip) {
        for (_current = 0; _current < *_skip && !_isEOF; _current++) {
            _isEOF = _children[0]->getNext() == PlanState::IS_EOF;
        }

            

Reported by FlawFinder.

src/third_party/asio-master/asio/include/asio/detail/resolve_endpoint_op.hpp
2 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 70 Column: 7 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                    // the resolver operation.
    
      // Perform the blocking endpoint resolution operation.
      char host_name[NI_MAXHOST];
      char service_name[NI_MAXSERV];
      socket_ops::background_getnameinfo(o->cancel_token_, o->endpoint_.data(),
          o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
          o->endpoint_.protocol().type(), o->ec_);
      o->results_ = results_type::create(o->endpoint_, host_name, service_name);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 71 Column: 7 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                  
      // Perform the blocking endpoint resolution operation.
      char host_name[NI_MAXHOST];
      char service_name[NI_MAXSERV];
      socket_ops::background_getnameinfo(o->cancel_token_, o->endpoint_.data(),
          o->endpoint_.size(), host_name, NI_MAXHOST, service_name, NI_MAXSERV,
          o->endpoint_.protocol().type(), o->ec_);
      o->results_ = results_type::create(o->endpoint_, host_name, service_name);


            

Reported by FlawFinder.

src/third_party/asio-master/asio/include/asio/detail/resolver_service.hpp
2 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 109 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                results_type resolve(implementation_type&,
      const endpoint_type& endpoint, asio::error_code& ec)
  {
    char host_name[NI_MAXHOST];
    char service_name[NI_MAXSERV];
    socket_ops::sync_getnameinfo(endpoint.data(), endpoint.size(),
        host_name, NI_MAXHOST, service_name, NI_MAXSERV,
        endpoint.protocol().type(), ec);


            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 110 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                    const endpoint_type& endpoint, asio::error_code& ec)
  {
    char host_name[NI_MAXHOST];
    char service_name[NI_MAXSERV];
    socket_ops::sync_getnameinfo(endpoint.data(), endpoint.size(),
        host_name, NI_MAXHOST, service_name, NI_MAXSERV,
        endpoint.protocol().type(), ec);

    return ec ? results_type() : results_type::create(

            

Reported by FlawFinder.

src/third_party/asio-master/asio/include/asio/detail/socket_types.hpp
2 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 106 Column: 33 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              typedef unsigned __int16 u_short_type;
struct in4_addr_type { u_long_type s_addr; };
struct in4_mreq_type { in4_addr_type imr_multiaddr, imr_interface; };
struct in6_addr_type { unsigned char s6_addr[16]; };
struct in6_mreq_type { in6_addr_type ipv6mr_multiaddr;
  unsigned long ipv6mr_interface; };
struct socket_addr_type { int sa_family; };
struct sockaddr_in4_type { int sin_family;
  in4_addr_type sin_addr; u_short_type sin_port; };

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 116 Column: 12 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

                in6_addr_type sin6_addr; u_short_type sin6_port;
  u_long_type sin6_flowinfo; u_long_type sin6_scope_id; };
struct sockaddr_storage_type { int ss_family;
  unsigned char ss_bytes[128 - sizeof(int)]; };
struct addrinfo_type { int ai_flags;
  int ai_family, ai_socktype, ai_protocol;
  int ai_addrlen; const void* ai_addr;
  const char* ai_canonname; addrinfo_type* ai_next; };
struct linger_type { u_short_type l_onoff, l_linger; };

            

Reported by FlawFinder.

src/third_party/wiredtiger/test/3rdparty/extras-0.0.3/setup.py
2 issues
standard import "import os.path" should be placed before "from setuptools import setup"
Error

Line: 5 Column: 1

              """Distutils installer for extras."""

from setuptools import setup
import os.path

import extras
testtools_cmd = extras.try_import('testtools.TestCommand')



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 18 Column: 1

                  return version


def get_long_description():
    readme_path = os.path.join(
        os.path.dirname(__file__), 'README.rst')
    return open(readme_path).read()



            

Reported by Pylint.

src/third_party/unwind/dist/tests/test-init-remote.c
2 issues
fprintf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 43 Column: 4 CWE codes: 134
Suggestion: Use a constant for the format specification

              #include <libunwind.h>

#define panic(args...)				\
	{ fprintf (stderr, args); exit (-1); }

int verbose;

static int
do_backtrace (void)

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 50 Column: 3 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              static int
do_backtrace (void)
{
  char buf[512], name[256];
  unw_word_t ip, sp, off;
  unw_cursor_t cursor;
  unw_context_t uc;
  int ret;


            

Reported by FlawFinder.

src/third_party/unwind/dist/tests/ppc64-test-altivec.c
2 issues
fprintf - If format strings can be influenced by an attacker, they can be exploited
Security

Line: 12 Column: 26 CWE codes: 134
Suggestion: Use a constant for the format specification

              
#include <sys/resource.h>

#define panic(args...)	{ fprintf (stderr, args);  abort(); }

extern vector signed int vec_init ();
extern void vec_print (vector signed int v);

vector signed int vec_stack (int count);

            

Reported by FlawFinder.

char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 83 Column: 5 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	      if (verbose)
		{
		  const char *regname = unw_regname (UNW_PPC64_V30);
		  char proc_name_buffer[256];
		  unw_word_t offset;
                  unsigned int * vec_half1, * vec_half2;
                  vec_half1 = (unsigned int *)&vr;
                  vec_half2 = vec_half1 + 1;
		  printf ("ip = %016lx, sp=%016lx\n", (long) ip, (long) sp);

            

Reported by FlawFinder.

src/third_party/unwind/dist/tests/ia64-test-dyn1.c
2 issues
Uninitialized variable: addr
Error

Line: 66 CWE codes: 908

              #endif

  len = (char *) memend - (char *) mem;
  memcpy (mem, addr, len);

  if (make_executable (mem, len) < 0)
    return NULL;

  if (di)

            

Reported by Cppcheck.

memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 66 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              #endif

  len = (char *) memend - (char *) mem;
  memcpy (mem, addr, len);

  if (make_executable (mem, len) < 0)
    return NULL;

  if (di)

            

Reported by FlawFinder.