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/fastd-21/doc/examples/status.c
Examining data/fastd-21/src/alloc.h
Examining data/fastd-21/src/android.c
Examining data/fastd-21/src/async.c
Examining data/fastd-21/src/async.h
Examining data/fastd-21/src/buffer.c
Examining data/fastd-21/src/buffer.h
Examining data/fastd-21/src/capabilities.c
Examining data/fastd-21/src/compat.h
Examining data/fastd-21/src/config.c
Examining data/fastd-21/src/config.h
Examining data/fastd-21/src/cpuid.h
Examining data/fastd-21/src/crypto/cipher/aes128_ctr/aes128_ctr.c
Examining data/fastd-21/src/crypto/cipher/aes128_ctr/openssl/aes128_ctr_openssl.c
Examining data/fastd-21/src/crypto/cipher/null/memcpy/null_memcpy.c
Examining data/fastd-21/src/crypto/cipher/null/null.c
Examining data/fastd-21/src/crypto/cipher/salsa20/nacl/salsa20_nacl.c
Examining data/fastd-21/src/crypto/cipher/salsa20/salsa20.c
Examining data/fastd-21/src/crypto/cipher/salsa20/xmm/salsa20_xmm.c
Examining data/fastd-21/src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c
Examining data/fastd-21/src/crypto/cipher/salsa2012/salsa2012.c
Examining data/fastd-21/src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c
Examining data/fastd-21/src/crypto/mac/ghash/builtin/ghash_builtin.c
Examining data/fastd-21/src/crypto/mac/ghash/ghash.c
Examining data/fastd-21/src/crypto/mac/ghash/ghash.h
Examining data/fastd-21/src/crypto/mac/ghash/pclmulqdq/ghash_pclmulqdq.c
Examining data/fastd-21/src/crypto/mac/ghash/pclmulqdq/ghash_pclmulqdq.h
Examining data/fastd-21/src/crypto/mac/ghash/pclmulqdq/ghash_pclmulqdq_impl.c
Examining data/fastd-21/src/crypto/mac/uhash/builtin/uhash_builtin.c
Examining data/fastd-21/src/crypto/mac/uhash/uhash.c
Examining data/fastd-21/src/crypto.h
Examining data/fastd-21/src/fastd.c
Examining data/fastd-21/src/fastd.h
Examining data/fastd-21/src/handshake.c
Examining data/fastd-21/src/handshake.h
Examining data/fastd-21/src/hash.h
Examining data/fastd-21/src/hkdf_sha256.c
Examining data/fastd-21/src/hkdf_sha256.h
Examining data/fastd-21/src/iface.c
Examining data/fastd-21/src/lex.c
Examining data/fastd-21/src/lex.h
Examining data/fastd-21/src/log.c
Examining data/fastd-21/src/log.h
Examining data/fastd-21/src/main.c
Examining data/fastd-21/src/method.h
Examining data/fastd-21/src/methods/cipher_test/cipher_test.c
Examining data/fastd-21/src/methods/common.c
Examining data/fastd-21/src/methods/common.h
Examining data/fastd-21/src/methods/composed_gmac/composed_gmac.c
Examining data/fastd-21/src/methods/composed_umac/composed_umac.c
Examining data/fastd-21/src/methods/generic_gmac/generic_gmac.c
Examining data/fastd-21/src/methods/generic_poly1305/generic_poly1305.c
Examining data/fastd-21/src/methods/generic_umac/generic_umac.c
Examining data/fastd-21/src/methods/null/null.c
Examining data/fastd-21/src/options.c
Examining data/fastd-21/src/options.def.h
Examining data/fastd-21/src/peer.c
Examining data/fastd-21/src/peer.h
Examining data/fastd-21/src/peer_group.h
Examining data/fastd-21/src/peer_hashtable.c
Examining data/fastd-21/src/peer_hashtable.h
Examining data/fastd-21/src/polling.c
Examining data/fastd-21/src/polling.h
Examining data/fastd-21/src/pqueue.c
Examining data/fastd-21/src/pqueue.h
Examining data/fastd-21/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c
Examining data/fastd-21/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h
Examining data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c
Examining data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.h
Examining data/fastd-21/src/protocols/ec25519_fhmqvc/state.c
Examining data/fastd-21/src/protocols/ec25519_fhmqvc/util.c
Examining data/fastd-21/src/random.c
Examining data/fastd-21/src/receive.c
Examining data/fastd-21/src/resolve.c
Examining data/fastd-21/src/sem.h
Examining data/fastd-21/src/send.c
Examining data/fastd-21/src/sha256.c
Examining data/fastd-21/src/sha256.h
Examining data/fastd-21/src/shell.c
Examining data/fastd-21/src/shell.h
Examining data/fastd-21/src/socket.c
Examining data/fastd-21/src/status.c
Examining data/fastd-21/src/task.c
Examining data/fastd-21/src/task.h
Examining data/fastd-21/src/time.c
Examining data/fastd-21/src/types.h
Examining data/fastd-21/src/util.h
Examining data/fastd-21/src/vector.c
Examining data/fastd-21/src/vector.h
Examining data/fastd-21/src/verify.c
Examining data/fastd-21/src/verify.h
Examining data/fastd-21/test/benchmark-uhash.c
Examining data/fastd-21/test/test-uhash.c
Examining data/fastd-21/test/uhash-common.h

FINAL RESULTS:

data/fastd-21/src/iface.c:242:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
		strncat(dev_name, ifname, IFNAMSIZ - 1);
data/fastd-21/src/iface.c:247:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
		strncat(dev_name, type, IFNAMSIZ - 1);
data/fastd-21/src/iface.c:320:2:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
	strncat(dev_name, ifname, IFNAMSIZ - 1);
data/fastd-21/src/iface.c:367:3:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
		strncat(dev_name, ifname, IFNAMSIZ - 1);
data/fastd-21/src/compat.h:64:16:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#error unknown system, get_current_dir_name() not implemented
data/fastd-21/src/crypto.h:36:9:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	bool (*crypt)(
data/fastd-21/src/log.c:26:12:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	int ret = vsnprintf(buffer, size, format, ap);
data/fastd-21/src/methods/cipher_test/cipher_test.c:128:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/cipher_test/cipher_test.c:173:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:136:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->gmac_cipher->crypt(
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:198:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->gmac_cipher->crypt(
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:202:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:259:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->gmac_cipher->crypt(
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:263:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/composed_umac/composed_umac.c:176:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->umac_cipher->crypt(
data/fastd-21/src/methods/composed_umac/composed_umac.c:180:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/composed_umac/composed_umac.c:237:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->umac_cipher->crypt(
data/fastd-21/src/methods/composed_umac/composed_umac.c:241:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:107:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(session->cipher_state, &H, &zeroblock, sizeof(fastd_block128_t), zeroiv)) {
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:164:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:218:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/generic_poly1305/generic_poly1305.c:145:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/generic_poly1305/generic_poly1305.c:202:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	bool ok = session->cipher->crypt(
data/fastd-21/src/methods/generic_umac/generic_umac.c:144:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/methods/generic_umac/generic_umac.c:198:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	if (!session->cipher->crypt(
data/fastd-21/src/shell.c:123:2:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execl("/bin/sh", "sh", "-c", command->command, (char *)NULL);
data/fastd-21/src/status.c:207:2:  [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.
	snprintf(lockname, lockname_len, lock_format, conf.status_socket);
data/fastd-21/src/fastd.c:367:30:  [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 *notify_socket = getenv("NOTIFY_SOCKET");
data/fastd-21/src/fastd.c:405:2:  [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(seed);
data/fastd-21/src/fastd.h:433:33:  [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.
	unsigned int r = (unsigned int)random();
data/fastd-21/doc/examples/status.c:19:2:  [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 addrbuf[offsetof(struct sockaddr_un, sun_path) + addrlen + 1];
data/fastd-21/doc/examples/status.c:24:2:  [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(addr->sun_path, argv[1], addrlen+1);
data/fastd-21/doc/examples/status.c:37:2:  [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/fastd-21/src/android.c:189:2:  [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 pid[20];
data/fastd-21/src/android.c:208:2:  [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/fastd-21/src/buffer.h:46:2:  [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(new_buffer->data, buffer->data, buffer->len);
data/fastd-21/src/buffer.h:100:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buffer->data, data, len);
data/fastd-21/src/buffer.h:115:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data, buffer->data, len);
data/fastd-21/src/buffer.h:135:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data, view->data, len);
data/fastd-21/src/config.c:320:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		file = fopen(filename, "r");
data/fastd-21/src/config.c:412:4:  [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[bufspace];
data/fastd-21/src/config.c:433:4:  [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[bufspace];
data/fastd-21/src/crypto/cipher/null/memcpy/null_memcpy.c:30:2:  [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(out, in, len);
data/fastd-21/src/crypto/cipher/salsa20/nacl/salsa20_nacl.c:37:2:  [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(state->key, key, crypto_stream_salsa20_KEYBYTES);
data/fastd-21/src/crypto/cipher/salsa20/xmm/salsa20_xmm.c:50:2:  [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(state->key, key, KEYBYTES);
data/fastd-21/src/crypto/cipher/salsa2012/nacl/salsa2012_nacl.c:37:2:  [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(state->key, key, crypto_stream_salsa2012_KEYBYTES);
data/fastd-21/src/crypto/cipher/salsa2012/xmm/salsa2012_xmm.c:50:2:  [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(state->key, key, KEYBYTES);
data/fastd-21/src/crypto/mac/ghash/builtin/ghash_builtin.c:72:2:  [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(&Hbase[0], key, sizeof(fastd_block128_t));
data/fastd-21/src/crypto/mac/ghash/pclmulqdq/ghash_pclmulqdq_impl.c:75:2:  [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(&state->H, key, sizeof(__m128i));
data/fastd-21/src/fastd.c:247:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *f = fopen(conf.pid_file, "w");
data/fastd-21/src/fastd.h:465:2:  [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, buffer->data + offsetof(fastd_eth_header_t, source), sizeof(fastd_eth_addr_t));
data/fastd-21/src/fastd.h:472:2:  [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, buffer->data + offsetof(fastd_eth_header_t, dest), sizeof(fastd_eth_addr_t));
data/fastd-21/src/fastd.h:489:2:  [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->str, str, str_len + 1);
data/fastd-21/src/fastd.h:501:2:  [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->str, str, str_len);
data/fastd-21/src/fastd.h:514:2:  [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->str, str, str_len + 1);
data/fastd-21/src/handshake.c:22: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.
static const char *const RECORD_TYPES[RECORD_MAX] = {
data/fastd-21/src/handshake.c:117: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(ptr, method->str, lens[i]);
data/fastd-21/src/handshake.c:405:2:  [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 name0[n + 1];
data/fastd-21/src/handshake.c:406:2:  [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(name0, name, n);
data/fastd-21/src/handshake.h:149:2:  [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(dst, data, len);
data/fastd-21/src/hkdf_sha256.c:29:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + FASTD_SHA256_HASH_WORDS, info, infolen);
data/fastd-21/src/hkdf_sha256.c:35: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(buf, out, FASTD_SHA256_HASH_BYTES);
data/fastd-21/src/iface.c:82:45:  [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).
	iface->fd = FASTD_POLL_FD(POLL_TYPE_IFACE, open(dev_name, O_RDWR | O_NONBLOCK));
data/fastd-21/src/iface.c:219:2:  [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 dev_name[5 + IFNAMSIZ] = "/dev/";
data/fastd-21/src/iface.c:250:45:  [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).
	iface->fd = FASTD_POLL_FD(POLL_TYPE_IFACE, open(dev_name, O_RDWR | O_NONBLOCK));
data/fastd-21/src/iface.c:319:2:  [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 dev_name[5 + IFNAMSIZ] = "/dev/";
data/fastd-21/src/iface.c:322:45:  [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).
	iface->fd = FASTD_POLL_FD(POLL_TYPE_IFACE, open(dev_name, O_RDWR | O_NONBLOCK));
data/fastd-21/src/iface.c:359:2:  [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 dev_name[5 + IFNAMSIZ] = "/dev/";
data/fastd-21/src/iface.c:370:45:  [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).
	iface->fd = FASTD_POLL_FD(POLL_TYPE_IFACE, open(dev_name, O_RDWR | O_NONBLOCK));
data/fastd-21/src/iface.c:456:2:  [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 ifnamebuf[IFNAMSIZ];
data/fastd-21/src/iface.c:468:4:  [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 prefix[percent - ifname + 1];
data/fastd-21/src/iface.c:469:4:  [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(prefix, ifname, percent - ifname);
data/fastd-21/src/iface.c:486: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[17];
data/fastd-21/src/lex.c:29:2:  [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]; /**< The input buffer */
data/fastd-21/src/log.c:39:2:  [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 addr_buf[INET6_ADDRSTRLEN] = "";
data/fastd-21/src/log.c:60:4:  [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 ifname_buf[IFNAMSIZ];
data/fastd-21/src/log.c:83:4:  [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[17];
data/fastd-21/src/log.c:253:2:  [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/fastd-21/src/log.c:265: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 timestr[100] = "";
data/fastd-21/src/methods/cipher_test/cipher_test.c:48:2:  [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 cipher_name[len - 11];
data/fastd-21/src/methods/cipher_test/cipher_test.c:49:2:  [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(cipher_name, name, len - 12);
data/fastd-21/src/methods/common.c:81: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(session->receive_nonce, nonce, COMMON_NONCEBYTES);
data/fastd-21/src/methods/common.h:153:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, nonce, min_size_t(len, COMMON_NONCEBYTES));
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:63:2:  [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 cipher_name[len];
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:66: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(cipher_name, name, len - 4);
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:72: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(cipher_name, name, len - 5);
data/fastd-21/src/methods/composed_umac/composed_umac.c:61:2:  [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 cipher_name[len];
data/fastd-21/src/methods/composed_umac/composed_umac.c:64: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(cipher_name, name, len - 5);
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:51:2:  [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 cipher_name[len + 1];
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:54: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(cipher_name, name, len - 3);
data/fastd-21/src/methods/generic_gmac/generic_gmac.c: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(cipher_name, name, len - 5);
data/fastd-21/src/methods/generic_poly1305/generic_poly1305.c:61:2:  [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 cipher_name[len - 8];
data/fastd-21/src/methods/generic_poly1305/generic_poly1305.c:62:2:  [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(cipher_name, name, len - 9);
data/fastd-21/src/methods/generic_umac/generic_umac.c:50:2:  [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 cipher_name[len + 1];
data/fastd-21/src/methods/generic_umac/generic_umac.c:53: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(cipher_name, name, len - 5);
data/fastd-21/src/peer.c:28:2:  [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[INET6_ADDRSTRLEN + IFNAMSIZ];
data/fastd-21/src/peer.c:345:2:  [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(remote->addresses, addresses, n_addresses * sizeof(fastd_peer_address_t));
data/fastd-21/src/peer.c:511: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(&addr->in.sin_addr.s_addr, &mapped.sin6_addr.s6_addr[12], 4);
data/fastd-21/src/peer.c:525: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(&addr->in6.sin6_addr.s6_addr[12], &addr4.sin_addr.s_addr, 4);
data/fastd-21/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h:116:28:  [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 inline void hexdump(char out[65], const unsigned char d[32]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.h:116:57:  [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 inline void hexdump(char out[65], const unsigned char d[32]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:46:2:  [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(info, A, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:47:2:  [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(info + PUBLICKEYBYTES, B, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:48:2:  [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(info + 2 * PUBLICKEYBYTES, X, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:49:2:  [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(info + 3 * PUBLICKEYBYTES, Y, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:50:2:  [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(info + 4 * PUBLICKEYBYTES, method_name, methodlen);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:192:2:  [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.p, hashbuf.b, HASHBYTES / 2);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:193:2:  [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(e.p, hashbuf.b + HASHBYTES / 2, HASHBYTES / 2);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:291:2:  [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(mac, hmacbuf.b, HASHBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:317:2:  [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(mac, handshake->records[RECORD_TLV_MAC].data, HASHBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:345:2:  [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(tlv_mac, hmacbuf.b, HASHBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:368:2:  [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(mac, handshake->records[RECORD_TLV_MAC].data, HASHBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:486:87:  [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 inline void print_unknown_key(const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:500: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.
add_dynamic(fastd_socket_t *sock, const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:523:2:  [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(&peer_key.key, key, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:565:2:  [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(&verify_data.peer_handshake_key, handshake->records[RECORD_SENDER_HANDSHAKE_KEY].data, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:601:91:  [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.
add_dynamic(UNUSED fastd_socket_t *sock, const fastd_peer_address_t *addr, const unsigned char key[PUBLICKEYBYTES]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:676:2:  [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(&peer_handshake_key, handshake->records[RECORD_SENDER_HANDSHAKE_KEY].data, PUBLICKEYBYTES);
data/fastd-21/src/protocols/ec25519_fhmqvc/util.c:18:40:  [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 inline void print_hexdump(const char *desc, const unsigned char d[32]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/util.c:18:67:  [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 inline void print_hexdump(const char *desc, const unsigned char d[32]) {
data/fastd-21/src/protocols/ec25519_fhmqvc/util.c:19:2:  [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[65];
data/fastd-21/src/protocols/ec25519_fhmqvc/util.c:58:2:  [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[65];
data/fastd-21/src/protocols/ec25519_fhmqvc/util.c:82:2:  [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 dumpbuf[65];
data/fastd-21/src/random.c:27:8:  [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).
		fd = open("/dev/random", O_RDONLY);
data/fastd-21/src/random.c:29:8:  [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).
		fd = open("/dev/urandom", O_RDONLY);
data/fastd-21/src/resolve.c:37:2:  [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 portstr[6];
data/fastd-21/src/resolve.c:74:4:  [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->addr[n_addr], res2->ai_addr, res2->ai_addrlen);
data/fastd-21/src/send.c:46: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(CMSG_DATA(cmsg), &pktinfo, sizeof(pktinfo));
data/fastd-21/src/send.c:64: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(CMSG_DATA(cmsg), &pktinfo, sizeof(pktinfo));
data/fastd-21/src/sha256.c:40:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(&tmp, &in[i], *left);
data/fastd-21/src/shell.c:62: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[6];
data/fastd-21/src/shell.c:76:2:  [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/fastd-21/src/status.c:96:2:  [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 addr_buf[1 + INET6_ADDRSTRLEN + 2 + IFNAMSIZ + 1 + 5 + 1];
data/fastd-21/src/status.c:136:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char eth_addr_buf[18];
data/fastd-21/src/status.c:172: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[65];
data/fastd-21/src/status.c:206:2:  [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 lockname[lockname_len];
data/fastd-21/src/status.c:209:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int lock_fd = open(lockname, O_RDONLY | O_CREAT, 0600);
data/fastd-21/src/status.c:263:2:  [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(sa->sun_path, conf.status_socket, status_socket_len + 1);
data/fastd-21/src/vector.c:66:2:  [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, element, elemsize);
data/fastd-21/src/verify.c:111: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(arg->ret.protocol_data, data, data_len);
data/fastd-21/test/test-uhash.c:39:2:  [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(inblock, in, len);
data/fastd-21/doc/examples/status.c:16: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).
	size_t addrlen = strlen(argv[1]);
data/fastd-21/src/android.c:164:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path + 1, CTRL_SOCK_NAME, sizeof(addr.sun_path) - 2);
data/fastd-21/src/android.c:165:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int socklen = offsetof(struct sockaddr_un, sun_path) + strlen(CTRL_SOCK_NAME) + 1;
data/fastd-21/src/android.c:191:43:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (write(ctx.android_ctrl_sock_fd, pid, strlen(pid)) != strlen(pid)) {
data/fastd-21/src/android.c:191:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (write(ctx.android_ctrl_sock_fd, pid, strlen(pid)) != strlen(pid)) {
data/fastd-21/src/android.c:209:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(ctx.android_ctrl_sock_fd, buf, sizeof(buf)) == -1) {
data/fastd-21/src/config.c:230:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (result->d_name[strlen(result->d_name) - 1] == '~') {
data/fastd-21/src/fastd.c:336:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (read(pipefd[0], &status, 1) < 0)
data/fastd-21/src/fastd.c:381:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sa.sun_path, notify_socket, sizeof(sa.sun_path));
data/fastd-21/src/fastd.h:484: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).
	size_t str_len = strlen(str);
data/fastd-21/src/fastd.h:509: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).
	size_t str_len = strlen(str);
data/fastd-21/src/handshake.c:107:13:  [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).
		lens[i] = strlen(method->str) + 1;
data/fastd-21/src/handshake.c:126:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) != strnlen(buf, maxlen))
data/fastd-21/src/handshake.c:146:11:  [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).
		data += strlen(part->str) + 1;
data/fastd-21/src/handshake.c:156:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t version_len = strlen(FASTD_VERSION);
data/fastd-21/src/handshake.c:157:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t protocol_len = strlen(conf.protocol->name);
data/fastd-21/src/handshake.c:158:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t method_len = method ? strlen(method->name) : 0;
data/fastd-21/src/iface.c:87:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1);
data/fastd-21/src/iface.c:237:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(ifname) <= 3 || strncmp(ifname, type, 3) != 0) {
data/fastd-21/src/iface.c:285:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, iface->name, IFNAMSIZ - 1);
data/fastd-21/src/iface.c:379:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1);
data/fastd-21/src/iface.c:409:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t len = read(iface->fd.fd, buffer->data, max_len);
data/fastd-21/src/methods/cipher_test/cipher_test.c:41:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:62:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/fastd-21/src/methods/composed_gmac/composed_gmac.c:67:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(cipher_name + len - 4, "ctr", 4);
data/fastd-21/src/methods/composed_umac/composed_umac.c:60:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:50:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/fastd-21/src/methods/generic_gmac/generic_gmac.c:55:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(cipher_name + len - 3, "ctr", 4);
data/fastd-21/src/methods/generic_poly1305/generic_poly1305.c:54:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/fastd-21/src/methods/generic_umac/generic_umac.c:49:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(name);
data/fastd-21/src/options.c:45:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int len = strlen(options);
data/fastd-21/src/peer.c:44:54:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (if_indextoname(addr->in6.sin6_scope_id, buf + strlen(buf) + 1))
data/fastd-21/src/peer.c:45:9:  [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).
				buf[strlen(buf)] = '%';
data/fastd-21/src/protocols/ec25519_fhmqvc/ec25519_fhmqvc.c:19:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if ((strlen(hexkey) != 64) || (strspn(hexkey, "0123456789abcdefABCDEF") != 64))
data/fastd-21/src/protocols/ec25519_fhmqvc/handshake.c:43:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t methodlen = strlen(method_name);
data/fastd-21/src/random.c:35:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ssize_t ret = read(fd, ((char *)buffer) + read_bytes, len - read_bytes);
data/fastd-21/src/socket.c:78:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, addr->bindtodev, strlen(addr->bindtodev))) {
data/fastd-21/src/status.c:40:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t left = strlen(str);
data/fastd-21/src/status.c:205:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t lockname_len = strlen(lock_format) + strlen(conf.status_socket) + 1;
data/fastd-21/src/status.c:205:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t lockname_len = strlen(lock_format) + strlen(conf.status_socket) + 1;
data/fastd-21/src/status.c:255:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t status_socket_len = strlen(conf.status_socket);

ANALYSIS SUMMARY:

Hits = 182
Lines analyzed = 15752 in approximately 0.47 seconds (33842 lines/second)
Physical Source Lines of Code (SLOC) = 9737
Hits@level = [0]  33 [1]  41 [2] 111 [3]   3 [4]  23 [5]   4
Hits@level+ = [0+] 215 [1+] 182 [2+] 141 [3+]  30 [4+]  27 [5+]   4
Hits/KSLOC@level+ = [0+] 22.0807 [1+] 18.6916 [2+] 14.4808 [3+] 3.08103 [4+] 2.77293 [5+] 0.410804
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.