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/dnsdist-1.5.1/dnsdist-lua-bindings-dnsquestion.cc
Examining data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp
Examining data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c
Examining data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h
Examining data/dnsdist-1.5.1/ext/libbpf/libbpf.h
Examining data/dnsdist-1.5.1/ext/lmdb-safe/lmdb-safe.cc
Examining data/dnsdist-1.5.1/ext/incbin/incbin.h
Examining data/dnsdist-1.5.1/ext/json11/json11.cpp
Examining data/dnsdist-1.5.1/ext/json11/json11.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/router.cpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/url.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/yahttp-config.h
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/cookie.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/yahttp.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/utility.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/exception.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/router.hpp
Examining data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp
Examining data/dnsdist-1.5.1/iputils.cc
Examining data/dnsdist-1.5.1/libssl.cc
Examining data/dnsdist-1.5.1/dnsdist-backend.cc
Examining data/dnsdist-1.5.1/cdb.cc
Examining data/dnsdist-1.5.1/dnsdist-rings.cc
Examining data/dnsdist-1.5.1/dnsdist-healthchecks.cc
Examining data/dnsdist-1.5.1/test-dnsparser_cc.cc
Examining data/dnsdist-1.5.1/dnsdist-secpoll.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-bindings.cc
Examining data/dnsdist-1.5.1/dnsdist-proxy-protocol.cc
Examining data/dnsdist-1.5.1/pollmplexer.cc
Examining data/dnsdist-1.5.1/dnsdist-idstate.cc
Examining data/dnsdist-1.5.1/dnsdist.cc
Examining data/dnsdist-1.5.1/dnsdist-tcp.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-inspection-ffi.cc
Examining data/dnsdist-1.5.1/capabilities.cc
Examining data/dnsdist-1.5.1/test-dnsdistlbpolicies_cc.cc
Examining data/dnsdist-1.5.1/threadname.cc
Examining data/dnsdist-1.5.1/proxy-protocol.cc
Examining data/dnsdist-1.5.1/dnsdist-dynbpf.cc
Examining data/dnsdist-1.5.1/dnsdist-protobuf.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-actions.cc
Examining data/dnsdist-1.5.1/dnsdist-ecs.cc
Examining data/dnsdist-1.5.1/test-dnsdistrings_cc.cc
Examining data/dnsdist-1.5.1/dnsdist-kvs.cc
Examining data/dnsdist-1.5.1/test-proxy_protocol_cc.cc
Examining data/dnsdist-1.5.1/delaypipe.cc
Examining data/dnsdist-1.5.1/dnsdist-xpf.cc
Examining data/dnsdist-1.5.1/dnsdist-web.cc
Examining data/dnsdist-1.5.1/dnsdist-dnscrypt.cc
Examining data/dnsdist-1.5.1/dnsdist-cache.cc
Examining data/dnsdist-1.5.1/dns.cc
Examining data/dnsdist-1.5.1/doh.cc
Examining data/dnsdist-1.5.1/dnslabeltext.cc
Examining data/dnsdist-1.5.1/sodcrypto.cc
Examining data/dnsdist-1.5.1/dnsdist-lua.cc
Examining data/dnsdist-1.5.1/dnsparser.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-ffi.cc
Examining data/dnsdist-1.5.1/fstrm_logger.cc
Examining data/dnsdist-1.5.1/test-dnscrypt_cc.cc
Examining data/dnsdist-1.5.1/ipcipher.cc
Examining data/dnsdist-1.5.1/dnsdist-snmp.cc
Examining data/dnsdist-1.5.1/test-base64_cc.cc
Examining data/dnsdist-1.5.1/htmlfiles.h
Examining data/dnsdist-1.5.1/test-mplexer.cc
Examining data/dnsdist-1.5.1/ednssubnet.cc
Examining data/dnsdist-1.5.1/uuid-utils.cc
Examining data/dnsdist-1.5.1/testrunner.cc
Examining data/dnsdist-1.5.1/tcpiohandler.cc
Examining data/dnsdist-1.5.1/kqueuemplexer.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-bindings-kvs.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-vars.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-bindings-packetcache.cc
Examining data/dnsdist-1.5.1/dnsdist-systemd.cc
Examining data/dnsdist-1.5.1/misc.cc
Examining data/dnsdist-1.5.1/dnstap.cc
Examining data/dnsdist-1.5.1/remote_logger.cc
Examining data/dnsdist-1.5.1/dnsdist-lbpolicies.cc
Examining data/dnsdist-1.5.1/test-dnsdistkvs_cc.cc
Examining data/dnsdist-1.5.1/ednscookies.cc
Examining data/dnsdist-1.5.1/epollmplexer.cc
Examining data/dnsdist-1.5.1/ednsoptions.cc
Examining data/dnsdist-1.5.1/devpollmplexer.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-rules.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-bindings-dnscrypt.cc
Examining data/dnsdist-1.5.1/dnsdist-carbon.cc
Examining data/dnsdist-1.5.1/portsmplexer.cc
Examining data/dnsdist-1.5.1/dnscrypt.cc
Examining data/dnsdist-1.5.1/bpf-filter.cc
Examining data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc
Examining data/dnsdist-1.5.1/test-dnsdistrules_cc.cc
Examining data/dnsdist-1.5.1/statnode.cc
Examining data/dnsdist-1.5.1/test-iputils_hh.cc
Examining data/dnsdist-1.5.1/dnsdist-console.cc
Examining data/dnsdist-1.5.1/test-dnsdist_cc.cc
Examining data/dnsdist-1.5.1/test-dnsdistdynblocks_hh.cc
Examining data/dnsdist-1.5.1/snmp-agent.cc
Examining data/dnsdist-1.5.1/qtype.cc
Examining data/dnsdist-1.5.1/protobuf.cc
Examining data/dnsdist-1.5.1/dnsdist-dynblocks.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-inspection.cc
Examining data/dnsdist-1.5.1/test-delaypipe_hh.cc
Examining data/dnsdist-1.5.1/xpf.cc
Examining data/dnsdist-1.5.1/dnsname.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-bindings-protobuf.cc
Examining data/dnsdist-1.5.1/dnswriter.cc
Examining data/dnsdist-1.5.1/dnsdist-lua-ffi-interface.h
Examining data/dnsdist-1.5.1/gettime.cc

FINAL RESULTS:

data/dnsdist-1.5.1/dnsdist-lua-vars.cc:130:34:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
          warnlog(string.format("access to dnsdist.%s is deprecated, please use %s.%s", key, tname, key))
data/dnsdist-1.5.1/dnsname.cc:449: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.
      auto got = snprintf(buf, sizeof(buf), "%03" PRIu8, p);
data/dnsdist-1.5.1/ext/json11/json11.hpp:65:17:  [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.
        #ifndef snprintf
data/dnsdist-1.5.1/ext/json11/json11.hpp:66:21:  [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_s
data/dnsdist-1.5.1/dnsdist-console.cc:70:25:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  const char *homedir = getenv("HOME");
data/dnsdist-1.5.1/dnsdist-lbpolicies.cc:122:20:  [3] (random) random:
  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.
  return valrandom(random(), servers);
data/dnsdist-1.5.1/dnsdist-lua-rules.cc:327:40:  [3] (random) random:
  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.
        i.qname=DNSName(std::to_string(random()));
data/dnsdist-1.5.1/dnsdist-lua-rules.cc:329:19:  [3] (random) random:
  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.
        i.qtype = random() % 0xff;
data/dnsdist-1.5.1/dnsdist-lua-rules.cc:332:38:  [3] (random) random:
  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.
        i.rem.sin4.sin_addr.s_addr = random();
data/dnsdist-1.5.1/dnsdist-systemd.cc:29:7:  [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.
  c = getenv("NOTIFY_SOCKET"); // XXX Ideally we'd check for INVOCATION_ID (systemd.exec(5)), but that was introduced in systemd 232, and Debian Jessie has 215
data/dnsdist-1.5.1/dnsdist.cc:1555:11:  [3] (random) random:
  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.
  return (random() % 65536);
data/dnsdist-1.5.1/dnsdist.cc:2002:3:  [3] (random) srandom:
  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.
  srandom(randombytes_uniform(0xffffffff));
data/dnsdist-1.5.1/dnsdist.cc:2007:5:  [3] (random) srandom:
  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.
    srandom(tv.tv_sec ^ tv.tv_usec ^ getpid());
data/dnsdist-1.5.1/dnsdist.cc:2008:19:  [3] (random) random:
  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.
    g_hashperturb=random();
data/dnsdist-1.5.1/dnsdist.cc:2034:11:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    int c=getopt_long(argc, argv, "a:cC:e:g:hk:l:u:vV", longopts, &longindex);
data/dnsdist-1.5.1/misc.cc:386:15:  [3] (random) random:
  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.
  advance(it, random() % pollinFDs.size());
data/dnsdist-1.5.1/misc.cc:417:16:  [3] (random) random:
  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.
    *fd = pfds[random()%2].fd;
data/dnsdist-1.5.1/bpf-filter.cc:94:3:  [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 log_buf[65535];
data/dnsdist-1.5.1/bpf-filter.cc:307:3:  [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(key.qname, keyStr.c_str(), keyStr.size());
data/dnsdist-1.5.1/bpf-filter.cc:340:3:  [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(key.qname, keyStr.c_str(), keyStr.size());
data/dnsdist-1.5.1/cdb.cc:35: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).
  d_fd = open(cdbfile.c_str(), O_RDONLY);
data/dnsdist-1.5.1/devpollmplexer.cc:78: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).
  d_devpollfd=open("/dev/poll", O_RDWR);
data/dnsdist-1.5.1/dnscrypt.cc:139:53:  [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.
void DNSCryptContext::generateProviderKeys(unsigned char publicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE], unsigned char privateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE])
data/dnsdist-1.5.1/dnscrypt.cc:139:113:  [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.
void DNSCryptContext::generateProviderKeys(unsigned char publicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE], unsigned char privateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE])
data/dnsdist-1.5.1/dnscrypt.cc:148:62:  [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.
std::string DNSCryptContext::getProviderFingerprint(unsigned char publicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE])
data/dnsdist-1.5.1/dnscrypt.cc:164:92:  [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.
void DNSCryptContext::setExchangeVersion(const DNSCryptExchangeVersion& version,  unsigned char esVersion[sizeof(DNSCryptCert::esVersion)])
data/dnsdist-1.5.1/dnscrypt.cc:179:76:  [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.
DNSCryptExchangeVersion DNSCryptContext::getExchangeVersion(const unsigned char esVersion[sizeof(DNSCryptCert::esVersion)])
data/dnsdist-1.5.1/dnscrypt.cc:201:141:  [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.
void DNSCryptContext::generateCertificate(uint32_t serial, time_t begin, time_t end, const DNSCryptExchangeVersion& version, const unsigned char providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE], DNSCryptPrivateKey& privateKey, DNSCryptCert& cert)
data/dnsdist-1.5.1/dnscrypt.cc:203:12:  [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 magic[DNSCRYPT_CERT_MAGIC_SIZE] = DNSCRYPT_CERT_MAGIC_VALUE;
data/dnsdist-1.5.1/dnscrypt.cc:205:12:  [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 pubK[DNSCRYPT_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/dnscrypt.cc:206:12:  [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 esVersion[sizeof(DNSCryptCert::esVersion)];
data/dnsdist-1.5.1/dnscrypt.cc:211:3:  [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(cert.magic, magic, sizeof(magic));
data/dnsdist-1.5.1/dnscrypt.cc:212:3:  [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(cert.esVersion, esVersion, sizeof(esVersion));
data/dnsdist-1.5.1/dnscrypt.cc:213:3:  [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(cert.protocolMinorVersion, protocolMinorVersion, sizeof(protocolMinorVersion));
data/dnsdist-1.5.1/dnscrypt.cc:254:83:  [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.
void DNSCryptContext::generateResolverKeyPair(DNSCryptPrivateKey& privK, unsigned char pubK[DNSCRYPT_PUBLIC_KEY_SIZE])
data/dnsdist-1.5.1/dnscrypt.cc:275:3:  [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/dnsdist-1.5.1/dnscrypt.cc:499:12:  [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 nonce[DNSCRYPT_NONCE_SIZE];
data/dnsdist-1.5.1/dnscrypt.cc:504:3:  [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(nonce, &d_header.clientNonce, sizeof(d_header.clientNonce));
data/dnsdist-1.5.1/dnscrypt.cc:607: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(dest + pos, &value, sizeof(value));
data/dnsdist-1.5.1/dnscrypt.cc:623:12:  [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 nonce[DNSCRYPT_NONCE_SIZE];
data/dnsdist-1.5.1/dnscrypt.cc:624:3:  [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(nonce, d_header.clientNonce, (DNSCRYPT_NONCE_SIZE / 2));
data/dnsdist-1.5.1/dnscrypt.cc:625:3:  [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(&(nonce[DNSCRYPT_NONCE_SIZE / 2]), d_header.clientNonce, (DNSCRYPT_NONCE_SIZE / 2));
data/dnsdist-1.5.1/dnscrypt.cc:678:3:  [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(&responseHeader.nonce, &d_header.clientNonce, sizeof d_header.clientNonce);
data/dnsdist-1.5.1/dnscrypt.cc:686:3:  [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(response + pos, &responseHeader, sizeof(responseHeader));
data/dnsdist-1.5.1/dnscrypt.cc:747:102:  [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.
int DNSCryptContext::encryptQuery(char* query, uint16_t queryLen, uint16_t querySize, const unsigned char clientPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE], const DNSCryptPrivateKey& clientPrivateKey, const unsigned char clientNonce[DNSCRYPT_NONCE_SIZE / 2], bool tcp, uint16_t* encryptedResponseLen, const std::shared_ptr<DNSCryptCert>& cert) const
data/dnsdist-1.5.1/dnscrypt.cc:747:209:  [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.
int DNSCryptContext::encryptQuery(char* query, uint16_t queryLen, uint16_t querySize, const unsigned char clientPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE], const DNSCryptPrivateKey& clientPrivateKey, const unsigned char clientNonce[DNSCRYPT_NONCE_SIZE / 2], bool tcp, uint16_t* encryptedResponseLen, const std::shared_ptr<DNSCryptCert>& cert) const
data/dnsdist-1.5.1/dnscrypt.cc:755:12:  [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 nonce[DNSCRYPT_NONCE_SIZE];
data/dnsdist-1.5.1/dnscrypt.cc:775:3:  [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(query + pos, cert->signedData.clientMagic, sizeof(cert->signedData.clientMagic));
data/dnsdist-1.5.1/dnscrypt.cc:779:3:  [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(query + pos, clientPublicKey, DNSCRYPT_PUBLIC_KEY_SIZE);
data/dnsdist-1.5.1/dnscrypt.cc:783:3:  [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(query + pos, clientNonce, DNSCRYPT_NONCE_SIZE / 2);
data/dnsdist-1.5.1/dnscrypt.cc:800:3:  [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(nonce, clientNonce, DNSCRYPT_NONCE_SIZE / 2);
data/dnsdist-1.5.1/dnscrypt.cc:839:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/dnsdist-cache.cc:256: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(response, &queryId, sizeof(queryId));
data/dnsdist-1.5.1/dnsdist-cache.cc:257: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(response + sizeof(queryId), value.value.c_str() + sizeof(queryId), sizeof(dnsheader) - sizeof(queryId));
data/dnsdist-1.5.1/dnsdist-cache.cc:271: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(response + sizeof(dnsheader), dnsQName.c_str(), dnsQNameLen);
data/dnsdist-1.5.1/dnsdist-cache.cc:273:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(response + sizeof(dnsheader) + dnsQNameLen, value.value.c_str() + sizeof(dnsheader) + dnsQNameLen, value.len - (sizeof(dnsheader) + dnsQNameLen));
data/dnsdist-1.5.1/dnsdist-console.cc:67:3:  [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[16384];
data/dnsdist-1.5.1/dnsdist-ecs.cc:446:3:  [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(&dh.d_ttl, &edns0, sizeof edns0);
data/dnsdist-1.5.1/dnsdist-ecs.cc:463: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(oldEcsOptionStart, newECSOption.c_str(), oldEcsOptionSize);
data/dnsdist-1.5.1/dnsdist-ecs.cc:485: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(oldEcsOptionStart + dataBehindSize, newECSOption.c_str(), newECSOption.size());
data/dnsdist-1.5.1/dnsdist-ecs.cc:546:3:  [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(packet + *len, newECSOption.c_str(), newECSOptionSize);
data/dnsdist-1.5.1/dnsdist-ecs.cc:581:3:  [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(packet + realPacketLen, EDNSRR.c_str(), EDNSRR.size());
data/dnsdist-1.5.1/dnsdist-ecs.cc:610: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(packet, &newContent.at(0), newContent.size());
data/dnsdist-1.5.1/dnsdist-ecs.cc:855:3:  [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(optPtr, optRecord.data(), optRecord.size());
data/dnsdist-1.5.1/dnsdist-ecs.cc:942:3:  [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(reinterpret_cast<char*>(dq.dh) + queryPartSize, soa.c_str(), soa.size());
data/dnsdist-1.5.1/dnsdist-ecs.cc:1075:3:  [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(&edns0, packet + optStart + 5, sizeof edns0);
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:226:3:  [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 packet[1500];
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:591:3:  [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(&recordstart[6], &ttl, sizeof(ttl));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:598: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(&recordstart[2], &qtype, sizeof(qtype));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:599: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(&recordstart[10], &rdataLen, sizeof(rdataLen));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:601: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(dest, recordstart, sizeof(recordstart));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:603: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(dest, wireData.c_str(), wireData.length());
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:610: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(&recordstart[2], &qtype, sizeof(qtype));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:611: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(&recordstart[10], &rdataLen, sizeof(rdataLen));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:613: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(dest, recordstart, sizeof(recordstart));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:615: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(dest, d_rawResponse.c_str(), d_rawResponse.size());
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:624:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&recordstart[2], &qtype, sizeof(qtype));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:625:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&recordstart[10], &rdataLen, sizeof(rdataLen));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:627:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dest, recordstart, sizeof(recordstart));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:630:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dest,
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:673: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(dest, res.c_str(), res.length());
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:712:51:  [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).
      d_fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(str.c_str(), "a+"), fclose);
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:714:51:  [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).
      d_fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(str.c_str(), "w"), fclose);
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:794:51:  [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).
      d_fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(str.c_str(), "a+"), fclose);
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:796:51:  [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).
      d_fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(str.c_str(), "w"), fclose);
data/dnsdist-1.5.1/dnsdist-lua-bindings-packetcache.cc:158: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).
        int fd = open(fname.c_str(), O_CREAT | O_EXCL | O_WRONLY, 0660);
data/dnsdist-1.5.1/dnsdist-lua-bindings.cc:182:43:  [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(&sin4.sin_addr.s_addr, raw.c_str(), raw.size());
data/dnsdist-1.5.1/dnsdist-lua-bindings.cc:192:43:  [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(&sin6.sin6_addr.s6_addr, raw.c_str(), raw.size());
data/dnsdist-1.5.1/dnsdist-lua-inspection.cc:366: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 date[80];
data/dnsdist-1.5.1/dnsdist-lua.cc:1352: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.
      unsigned char publicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/dnsdist-lua.cc:1353: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.
      unsigned char privateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/dnsdist-lua.cc:1384: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.
      unsigned char publicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/dnsdist-proxy-protocol.cc:33:3:  [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(dq.dh, payload.c_str(), payload.size());
data/dnsdist-1.5.1/dnsdist-web.cc:325:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[1024];
data/dnsdist-1.5.1/dnsdist-xpf.cc:57:3:  [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(reinterpret_cast<char*>(dq.dh) + pos, &root, sizeof(root));
data/dnsdist-1.5.1/dnsdist-xpf.cc:59:3:  [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(reinterpret_cast<char*>(dq.dh) + pos, &drh, sizeof(drh));
data/dnsdist-1.5.1/dnsdist-xpf.cc:61:3:  [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(reinterpret_cast<char*>(dq.dh) + pos, payload.data(), payload.size());
data/dnsdist-1.5.1/dnsdist.cc:317:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(*response + sizeof(dnsheader), realname.c_str(), realname.length());
data/dnsdist-1.5.1/dnsdist.cc:405:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(dhCopy, *dh, sizeof(dnsheader));
data/dnsdist-1.5.1/dnsdist.cc:544:3:  [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 packet[s_maxPacketCacheEntrySize + DNSCRYPT_MAX_RESPONSE_PADDING_AND_MAC_SIZE];
data/dnsdist-1.5.1/dnsdist.cc:1417: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 packet[s_maxPacketCacheEntrySize];
data/dnsdist-1.5.1/dnsdist.cc:1508: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 packet[s_maxPacketCacheEntrySize];
data/dnsdist-1.5.1/dnsparser.cc:64: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 hex[4];
data/dnsdist-1.5.1/dnsparser.cc:103:3:  [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(&packet[0], &dnsheader, sizeof(dnsheader)); pos+=sizeof(dnsheader);
data/dnsdist-1.5.1/dnsparser.cc:105:3:  [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 tmp[6]="\x0" "\x0\x1" "\x0\x1"; // root question for ns_t_a
data/dnsdist-1.5.1/dnsparser.cc:106:3:  [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(&packet[pos], &tmp, 5); pos+=5;
data/dnsdist-1.5.1/dnsparser.cc:108:3:  [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(&packet[pos], encoded.c_str(), encoded.size()); pos+=(uint16_t)encoded.size();
data/dnsdist-1.5.1/dnsparser.cc:116:3:  [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(&packet[pos], &drh, sizeof(drh)); pos+=sizeof(drh);
data/dnsdist-1.5.1/dnsparser.cc:118: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(&packet[pos], serialized.c_str(), serialized.size());
data/dnsdist-1.5.1/dnsparser.cc:220:3:  [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(&d_header, packet.data(), sizeof(dnsheader));
data/dnsdist-1.5.1/dnsparser.cc:365:3:  [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(dest, &d_content.at(d_pos), len);
data/dnsdist-1.5.1/dnsparser.cc:436:3:  [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 ebuf[5];
data/dnsdist-1.5.1/dnsparser.cc:567:22:  [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.
      const unsigned char rootptr[2]={0xc0,0x11};
data/dnsdist-1.5.1/dnsparser.cc:586: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((void*)&dh, (const dnsheader*)packet, sizeof(dh));
data/dnsdist-1.5.1/dnswriter.cc:60:3:  [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(dptr, ptr, sizeof(dnsheader));
data/dnsdist-1.5.1/dnswriter.cc:84: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.
    static unsigned char marker[2]={0xc0, 0x0c};
data/dnsdist-1.5.1/dnswriter.cc:120:3:  [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(&ttl, &stuff, sizeof(stuff));
data/dnsdist-1.5.1/dnswriter.cc:134:12:  [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 bytes[6];
data/dnsdist-1.5.1/dnswriter.cc:137:3:  [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(bytes, (void*)&theLeft, sizeof(theLeft));
data/dnsdist-1.5.1/dnswriter.cc:138:3:  [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(bytes+2, (void*)&theRight, sizeof(theRight));
data/dnsdist-1.5.1/doh.cc:1187:49:  [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 int ticket_key_callback(SSL *s, unsigned char keyName[TLS_TICKETS_KEY_NAME_SIZE], unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc)
data/dnsdist-1.5.1/ednssubnet.cc:63:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&address.sin4.sin_addr.s_addr, options+sizeof(esow), octetsin);
data/dnsdist-1.5.1/ednssubnet.cc:73:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(&address.sin6.sin6_addr.s6_addr, options+sizeof(esow), octetsin);
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:7: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.
arx_fwd(unsigned char state[4])
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c: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.
arx_bwd(unsigned char state[4])
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:54:26:  [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.
ipcrypt_encrypt(unsigned char out[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:55:32:  [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.
                const unsigned char in[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:56:32:  [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.
                const unsigned char key[IPCRYPT_KEYBYTES])
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:58:14:  [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 state[4];
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:72:26:  [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.
ipcrypt_decrypt(unsigned char out[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:73:32:  [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.
                const unsigned char in[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:74:32:  [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.
                const unsigned char key[IPCRYPT_KEYBYTES])
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.c:76:14:  [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 state[4];
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h:12:30:  [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.
int ipcrypt_encrypt(unsigned char out[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h:13:36:  [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.
                    const unsigned char in[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h:14:36:  [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.
                    const unsigned char key[IPCRYPT_KEYBYTES]);
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h:16:30:  [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.
int ipcrypt_decrypt(unsigned char out[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h:17:36:  [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.
                    const unsigned char in[IPCRYPT_BYTES],
data/dnsdist-1.5.1/ext/ipcrypt/ipcrypt.h:18:36:  [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.
                    const unsigned char key[IPCRYPT_KEYBYTES]);
data/dnsdist-1.5.1/ext/json11/json11.cpp:60: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/dnsdist-1.5.1/ext/json11/json11.cpp:69:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[32];
data/dnsdist-1.5.1/ext/json11/json11.cpp:97: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[8];
data/dnsdist-1.5.1/ext/json11/json11.cpp:326: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[12];
data/dnsdist-1.5.1/ext/json11/json11.cpp:596:25:  [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).
            return std::atoi(str.c_str() + start_pos);
data/dnsdist-1.5.1/ext/libbpf/libbpf.h:26:8:  [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.
extern char bpf_log_buf[LOG_BUF_SIZE];
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp:130:36:  [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).
              target->url.port = ::atoi(value.substr(pos1).c_str());
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp:167:11:  [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[100];
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp:293:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[1024];
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp:316:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[1024];
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.hpp:73: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[4096];
data/dnsdist-1.5.1/ext/yahttp/yahttp/utility.hpp:171: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).
          utc_offset = ::atoi(ptr) * sign;
data/dnsdist-1.5.1/ext/yahttp/yahttp/utility.hpp:252:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char repl[3];
data/dnsdist-1.5.1/fstrm_logger.cc:191:3:  [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(frame, data.c_str(), data.length());
data/dnsdist-1.5.1/ipcipher.cc:14:12:  [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 out[16];
data/dnsdist-1.5.1/iputils.cc:168:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy(tv, CMSG_DATA(cmsg), sizeof(*tv));
data/dnsdist-1.5.1/libssl.cc:133:84:  [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.
int libssl_ticket_key_callback(SSL *s, OpenSSLTLSTicketKeysRing& keyring, unsigned char keyName[TLS_TICKETS_KEY_NAME_SIZE], unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc)
data/dnsdist-1.5.1/libssl.cc:239:3:  [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(copy, data->second.data(), data->second.size());
data/dnsdist-1.5.1/libssl.cc:305:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buffer[4096];
data/dnsdist-1.5.1/libssl.cc:352:50:  [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).
  auto fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(certFile.c_str(), "r"), fclose);
data/dnsdist-1.5.1/libssl.cc:358:45:  [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 = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(caCert.c_str(), "r"), fclose);
data/dnsdist-1.5.1/libssl.cc:363:45:  [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 = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(caKey.c_str(), "r"), fclose);
data/dnsdist-1.5.1/libssl.cc:503:90:  [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.
std::shared_ptr<OpenSSLTLSTicketKey> OpenSSLTLSTicketKeysRing::getDecryptionKey(unsigned char name[TLS_TICKETS_KEY_NAME_SIZE], bool& activeKey)
data/dnsdist-1.5.1/libssl.cc:598:54:  [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.
bool OpenSSLTLSTicketKey::nameMatches(const unsigned char name[TLS_TICKETS_KEY_NAME_SIZE]) const
data/dnsdist-1.5.1/libssl.cc:603:43:  [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.
int OpenSSLTLSTicketKey::encrypt(unsigned char keyName[TLS_TICKETS_KEY_NAME_SIZE], unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx) const
data/dnsdist-1.5.1/libssl.cc:605:3:  [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(keyName, d_name, sizeof(d_name));
data/dnsdist-1.5.1/libssl.cc:751:50:  [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).
  auto fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(logFile.c_str(), "a"), fclose);
data/dnsdist-1.5.1/misc.cc:201:3:  [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[30];
data/dnsdist-1.5.1/misc.cc:493:3:  [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 tmp[MAXHOSTNAMELEN];
data/dnsdist-1.5.1/misc.cc:564:3:  [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 tmp[17];
data/dnsdist-1.5.1/misc.cc:576:3:  [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 tmp[5];
data/dnsdist-1.5.1/misc.cc:707: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(ret, res->ai_addr, res->ai_addrlen);
data/dnsdist-1.5.1/misc.cc:772:3:  [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[1024];
data/dnsdist-1.5.1/misc.cc:787:50:  [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).
  auto fp = std::unique_ptr<FILE, int(*)(FILE*)>(fopen(fname, "r"), fclose);
data/dnsdist-1.5.1/qtype.cc:91:12:  [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).
    return atoi(p+1);
data/dnsdist-1.5.1/qtype.cc:95:12:  [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).
    return atoi(p+4);
data/dnsdist-1.5.1/tcpiohandler.cc:328:43:  [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 int ticketKeyCb(SSL *s, unsigned char keyName[TLS_TICKETS_KEY_NAME_SIZE], unsigned char *iv, EVP_CIPHER_CTX *ectx, HMAC_CTX *hctx, int enc)
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:44:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:45:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:85:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:86:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:111:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:112:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:137:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:138:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:145:12:  [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 clientPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:149:12:  [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 clientNonce[DNSCRYPT_NONCE_SIZE / 2] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08, 0x09, 0x0A, 0x0B };
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:193:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:194:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:201:12:  [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 clientPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:205:12:  [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 clientNonce[DNSCRYPT_NONCE_SIZE / 2] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08, 0x09, 0x0A, 0x0B };
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:224:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:225:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:232:12:  [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 clientPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:236:12:  [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 clientNonce[DNSCRYPT_NONCE_SIZE / 2] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08, 0x09, 0x0A, 0x0B };
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:287:12:  [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 providerPublicKey[DNSCRYPT_PROVIDER_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:288:12:  [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 providerPrivateKey[DNSCRYPT_PROVIDER_PRIVATE_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:295:12:  [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 clientPublicKey[DNSCRYPT_PUBLIC_KEY_SIZE];
data/dnsdist-1.5.1/test-dnscrypt_cc.cc:299:12:  [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 clientNonce[DNSCRYPT_NONCE_SIZE / 2] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08, 0x09, 0x0A, 0x0B };
data/dnsdist-1.5.1/test-dnsdist_cc.cc:108: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:109: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:125: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(queryWithXPF.data(), packet, dq.len);
data/dnsdist-1.5.1/test-dnsdist_cc.cc:129: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:130: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:149: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:150: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:178: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:179: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:225:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:226:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:242:3:  [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(queryWithEDNS.data(), packet, len);
data/dnsdist-1.5.1/test-dnsdist_cc.cc:260:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:284:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:322:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:323:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:378:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:379:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:423:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:424:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:485:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:486:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:521:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:522:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:569:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:570:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:608:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:609:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:663:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:664:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:719:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:720:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:775:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:776:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:832:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:833:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:884:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:885:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:933:3:  [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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:934:3:  [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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:1938: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:1939: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:1964: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:1965: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(packet, queryWithEDNS.data(), queryWithEDNS.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:1994: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:1995: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2020: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2021: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(packet, queryWithEDNS.data(), queryWithEDNS.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2062: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2063: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2084: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2085: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2106: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 packet[1500];
data/dnsdist-1.5.1/test-dnsdist_cc.cc:2107: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(packet, query.data(), query.size());
data/dnsdist-1.5.1/test-dnsdistkvs_cc.cc:313:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    int fd = mkstemp(db);
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:48:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:82:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:107:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char response[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:156: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 responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:214: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 responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:271: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 responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:324:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:358:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:435: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 responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:480: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 responseBuf[4096];
data/dnsdist-1.5.1/test-dnsdistpacketcache_cc.cc:517: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 responseBuf[4096];
data/dnsdist-1.5.1/test-iputils_hh.cc:93: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(&p, (char*)&ca4.sin4.sin_addr.s_addr, 4);
data/dnsdist-1.5.1/test-iputils_hh.cc:96: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(&p, (char*)&orig.sin4.sin_addr.s_addr, 4);
data/dnsdist-1.5.1/test-mplexer.cc:146: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 buffer[1];
data/dnsdist-1.5.1/delaypipe.cc:63:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool ObjectPipe<T>::read(T* t)
data/dnsdist-1.5.1/delaypipe.cc:66:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  int ret = ::read(d_fds[0], &ptr, sizeof(ptr));
data/dnsdist-1.5.1/delaypipe.cc:90:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ret = ::read(d_fds[0], &ptr, sizeof(ptr)); // this is BLOCKING!
data/dnsdist-1.5.1/dnscrypt.cc:39:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  file.read((char*) key, sizeof(key));
data/dnsdist-1.5.1/dnscrypt.cc:239:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  file.read((char *) &dest, sizeof(dest));
data/dnsdist-1.5.1/dnscrypt.cc:845:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    providerKStream.read((char*) providerPrivateKey, sizeof(providerPrivateKey));
data/dnsdist-1.5.1/dnsdist-lua-actions.cc:234:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
      usleep(250000);
data/dnsdist-1.5.1/dnsdist-lua.cc:1388:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        file.read((char *) &publicKey, sizeof(publicKey));
data/dnsdist-1.5.1/dnsdist-secpoll.cc:123:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      sock.read(reply);
data/dnsdist-1.5.1/dnsdist-tcp.cc:406:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t res = ::read(fd, reinterpret_cast<char*>(&buffer.at(pos)), toRead - got);
data/dnsdist-1.5.1/dnsdist-tcp.cc:1310:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t got = read(pipefd, &citmp, sizeof(citmp));
data/dnsdist-1.5.1/dnsdist-web.cc:326:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      bytes = read(sock, buf, sizeof(buf));
data/dnsdist-1.5.1/doh.cc:1035:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ssize_t got = read(qsock, &du, sizeof(du));
data/dnsdist-1.5.1/doh.cc:1114:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ssize_t got = read(dsc->dohresponsepair[1], &du, sizeof(du));
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1086:68:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto val = Reader<typename std::decay<TReturnType>::type>::read(state, -object.getNum());
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1344:32:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            static const char* read(lua_State* /*l*/, void* data, size_t* size) {
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1350:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                me.stream.read(me.buffer.data(), me.buffer.size());
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1358:63:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        const auto loadReturnValue = lua_load(state, &Reader::read, &reader, "chunk"
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1695:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1745:80:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        const auto& firstElem = Reader<typename std::decay<TFirstType>::type>::read(state, index);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:1759:80:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        const auto& firstElem = Reader<typename std::decay<TFirstType>::type>::read(state, index);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2553:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2565:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2581:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2609:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2634:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2649:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2667:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2683:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2696:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2699:85:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (auto val = Reader<LuaContext::LuaFunctionCaller<TRetValue (TParameters...)>>::read(state, index))
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2713:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2726:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto val1 = Reader<TType1>::read(state, -2);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2727:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto val2 = Reader<TType2>::read(state, -1);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2751:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2764:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto key = Reader<TKey>::read(state, -2);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2765:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto value = Reader<TValue>::read(state, -1);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2789:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2802:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto key = Reader<TKey>::read(state, -2);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2803:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                auto value = Reader<TValue>::read(state, -1);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2831:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2836:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (auto&& other = Reader<TType>::read(state, index))
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2856:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2860:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (const auto val = SubReader::read(state, index))
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2862:90:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            return VariantReader<typename boost::mpl::next<TIterBegin>::type, TIterEnd>::read(state, index);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2870:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        static auto read(lua_State* /*state*/, int /*index*/)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2882:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2885:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        return MainVariantReader::read(state, index);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2895:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* /*state*/, int /*index*/, int /*maxSize*/ = 0)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2912:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index, int maxSize = std::tuple_size<ReturnType>::value)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2918:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto firstVal = Reader<TFirst>::read(state, index);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2919:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto othersVal = Reader<std::tuple<TOthers...>>::read(state, index + 1, maxSize - 1);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2938:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    static auto read(lua_State* state, int index, int maxSize = std::tuple_size<ReturnType>::value)
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2941:58:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto othersVal = Reader<std::tuple<TOthers...>>::read(state, index + 1, maxSize - 1);
data/dnsdist-1.5.1/ext/luawrapper/include/LuaContext.hpp:2948:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        auto firstVal = Reader<TFirst>::read(state, index);
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp:294:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      is.read(buf, 1024);
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.cpp:317:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      is.read(buf, 1024);
data/dnsdist-1.5.1/ext/yahttp/yahttp/reqresp.hpp:83:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          ifs.read(buf, sizeof buf);
data/dnsdist-1.5.1/libssl.cc:306:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      file.read(buffer, sizeof(buffer));
data/dnsdist-1.5.1/libssl.cc:571:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  file.read(reinterpret_cast<char*>(d_name), sizeof(d_name));
data/dnsdist-1.5.1/libssl.cc:572:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  file.read(reinterpret_cast<char*>(d_cipherKey), sizeof(d_cipherKey));
data/dnsdist-1.5.1/libssl.cc:573:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  file.read(reinterpret_cast<char*>(d_hmacKey), sizeof(d_hmacKey));
data/dnsdist-1.5.1/misc.cc:97:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    res = read(fd, (char*)buffer + pos, len - pos);
data/dnsdist-1.5.1/misc.cc:124:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t got = read(fd, (char *)buffer + pos, len - pos);
data/dnsdist-1.5.1/misc.cc:1592:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  hostname.resize(strlen(hostname.c_str()));
data/dnsdist-1.5.1/snmp-agent.cc:62:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    got = read(d_trapPipe[0], &varList, sizeof(varList));
data/dnsdist-1.5.1/tcpiohandler.cc:177:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  size_t read(void* buffer, size_t bufferSize, unsigned int readTimeout, unsigned int totalTimeout) override
data/dnsdist-1.5.1/tcpiohandler.cc:457:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      file.read(reinterpret_cast<char*>(d_key.data), d_key.size);
data/dnsdist-1.5.1/tcpiohandler.cc:614:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  size_t read(void* buffer, size_t bufferSize, unsigned int readTimeout, unsigned int totalTimeout) override
data/dnsdist-1.5.1/test-delaypipe_hh.cc:18:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool res=op.read(&i);
data/dnsdist-1.5.1/test-delaypipe_hh.cc:24:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  BOOST_CHECK_EQUAL(op.read(&i), false);
data/dnsdist-1.5.1/test-dnsdistrings_cc.cc:157:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(10000);
data/dnsdist-1.5.1/test-mplexer.cc:147:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t got = read(pipes[0], &buffer[0], sizeof(buffer));

ANALYSIS SUMMARY:

Hits = 340
Lines analyzed = 45042 in approximately 1.27 seconds (35515 lines/second)
Physical Source Lines of Code (SLOC) = 35099
Hits@level = [0]  28 [1]  73 [2] 250 [3]  13 [4]   4 [5]   0
Hits@level+ = [0+] 368 [1+] 340 [2+] 267 [3+]  17 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 10.4846 [1+] 9.68689 [2+] 7.60705 [3+] 0.484344 [4+] 0.113963 [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.