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/tinc-1.1~pre17/test/splice.c
Examining data/tinc-1.1~pre17/src/dropin.c
Examining data/tinc-1.1~pre17/src/process.c
Examining data/tinc-1.1~pre17/src/subnet.h
Examining data/tinc-1.1~pre17/src/node.c
Examining data/tinc-1.1~pre17/src/prf.h
Examining data/tinc-1.1~pre17/src/ipv6.h
Examining data/tinc-1.1~pre17/src/net.h
Examining data/tinc-1.1~pre17/src/event.c
Examining data/tinc-1.1~pre17/src/sptps.c
Examining data/tinc-1.1~pre17/src/getopt.h
Examining data/tinc-1.1~pre17/src/net_packet.c
Examining data/tinc-1.1~pre17/src/bsd/device.c
Examining data/tinc-1.1~pre17/src/bsd/tunemu.h
Examining data/tinc-1.1~pre17/src/bsd/tunemu.c
Examining data/tinc-1.1~pre17/src/sptps.h
Examining data/tinc-1.1~pre17/src/address_cache.c
Examining data/tinc-1.1~pre17/src/rsagen.h
Examining data/tinc-1.1~pre17/src/names.c
Examining data/tinc-1.1~pre17/src/meta.h
Examining data/tinc-1.1~pre17/src/splay_tree.h
Examining data/tinc-1.1~pre17/src/ifconfig.c
Examining data/tinc-1.1~pre17/src/tincd.c
Examining data/tinc-1.1~pre17/src/vde_device.c
Examining data/tinc-1.1~pre17/src/protocol_edge.c
Examining data/tinc-1.1~pre17/src/names.h
Examining data/tinc-1.1~pre17/src/top.h
Examining data/tinc-1.1~pre17/src/ecdsa.h
Examining data/tinc-1.1~pre17/src/dummy_device.c
Examining data/tinc-1.1~pre17/src/uml_device.c
Examining data/tinc-1.1~pre17/src/buffer.h
Examining data/tinc-1.1~pre17/src/device.h
Examining data/tinc-1.1~pre17/src/ecdsagen.h
Examining data/tinc-1.1~pre17/src/upnp.h
Examining data/tinc-1.1~pre17/src/list.c
Examining data/tinc-1.1~pre17/src/control.c
Examining data/tinc-1.1~pre17/src/digest.h
Examining data/tinc-1.1~pre17/src/process.h
Examining data/tinc-1.1~pre17/src/net.c
Examining data/tinc-1.1~pre17/src/mingw/device.c
Examining data/tinc-1.1~pre17/src/mingw/common.h
Examining data/tinc-1.1~pre17/src/have.h
Examining data/tinc-1.1~pre17/src/chacha-poly1305/chacha-poly1305.c
Examining data/tinc-1.1~pre17/src/chacha-poly1305/chacha.h
Examining data/tinc-1.1~pre17/src/chacha-poly1305/poly1305.c
Examining data/tinc-1.1~pre17/src/chacha-poly1305/poly1305.h
Examining data/tinc-1.1~pre17/src/chacha-poly1305/chacha.c
Examining data/tinc-1.1~pre17/src/chacha-poly1305/chacha-poly1305.h
Examining data/tinc-1.1~pre17/src/sptps_test.c
Examining data/tinc-1.1~pre17/src/autoconnect.h
Examining data/tinc-1.1~pre17/src/getopt.c
Examining data/tinc-1.1~pre17/src/list.h
Examining data/tinc-1.1~pre17/src/subnet_parse.c
Examining data/tinc-1.1~pre17/src/netutl.h
Examining data/tinc-1.1~pre17/src/protocol_subnet.c
Examining data/tinc-1.1~pre17/src/hash.h
Examining data/tinc-1.1~pre17/src/utils.c
Examining data/tinc-1.1~pre17/src/script.h
Examining data/tinc-1.1~pre17/src/logger.c
Examining data/tinc-1.1~pre17/src/tincctl.h
Examining data/tinc-1.1~pre17/src/net_socket.c
Examining data/tinc-1.1~pre17/src/system.h
Examining data/tinc-1.1~pre17/src/raw_socket_device.c
Examining data/tinc-1.1~pre17/src/net_setup.c
Examining data/tinc-1.1~pre17/src/solaris/device.c
Examining data/tinc-1.1~pre17/src/fsck.c
Examining data/tinc-1.1~pre17/src/ifconfig.h
Examining data/tinc-1.1~pre17/src/buffer.c
Examining data/tinc-1.1~pre17/src/ed25519/precomp_data.h
Examining data/tinc-1.1~pre17/src/ed25519/fixedint.h
Examining data/tinc-1.1~pre17/src/ed25519/key_exchange.c
Examining data/tinc-1.1~pre17/src/ed25519/ge.h
Examining data/tinc-1.1~pre17/src/ed25519/sc.c
Examining data/tinc-1.1~pre17/src/ed25519/ed25519.h
Examining data/tinc-1.1~pre17/src/ed25519/sha512.c
Examining data/tinc-1.1~pre17/src/ed25519/verify.c
Examining data/tinc-1.1~pre17/src/ed25519/fe.c
Examining data/tinc-1.1~pre17/src/ed25519/ecdsa.c
Examining data/tinc-1.1~pre17/src/ed25519/ecdsagen.c
Examining data/tinc-1.1~pre17/src/ed25519/sign.c
Examining data/tinc-1.1~pre17/src/ed25519/ecdh.c
Examining data/tinc-1.1~pre17/src/ed25519/sha512.h
Examining data/tinc-1.1~pre17/src/ed25519/keypair.c
Examining data/tinc-1.1~pre17/src/ed25519/fe.h
Examining data/tinc-1.1~pre17/src/ed25519/sc.h
Examining data/tinc-1.1~pre17/src/ed25519/ge.c
Examining data/tinc-1.1~pre17/src/gcrypt/digest.c
Examining data/tinc-1.1~pre17/src/gcrypt/digest.h
Examining data/tinc-1.1~pre17/src/gcrypt/cipher.c
Examining data/tinc-1.1~pre17/src/gcrypt/rsagen.c
Examining data/tinc-1.1~pre17/src/gcrypt/rsa.c
Examining data/tinc-1.1~pre17/src/gcrypt/prf.c
Examining data/tinc-1.1~pre17/src/gcrypt/crypto.c
Examining data/tinc-1.1~pre17/src/route.c
Examining data/tinc-1.1~pre17/src/connection.h
Examining data/tinc-1.1~pre17/src/invitation.c
Examining data/tinc-1.1~pre17/src/event.h
Examining data/tinc-1.1~pre17/src/version.h
Examining data/tinc-1.1~pre17/src/conf.h
Examining data/tinc-1.1~pre17/src/tincctl.c
Examining data/tinc-1.1~pre17/src/cipher.h
Examining data/tinc-1.1~pre17/src/subnet.c
Examining data/tinc-1.1~pre17/src/ecdh.h
Examining data/tinc-1.1~pre17/src/sptps_keypair.c
Examining data/tinc-1.1~pre17/src/hash.c
Examining data/tinc-1.1~pre17/src/utils.h
Examining data/tinc-1.1~pre17/src/version.c
Examining data/tinc-1.1~pre17/src/cygwin/device.c
Examining data/tinc-1.1~pre17/src/autoconnect.c
Examining data/tinc-1.1~pre17/src/getopt1.c
Examining data/tinc-1.1~pre17/src/node.h
Examining data/tinc-1.1~pre17/src/openssl/digest.c
Examining data/tinc-1.1~pre17/src/openssl/digest.h
Examining data/tinc-1.1~pre17/src/openssl/rsagen.c
Examining data/tinc-1.1~pre17/src/openssl/rsa.c
Examining data/tinc-1.1~pre17/src/openssl/prf.c
Examining data/tinc-1.1~pre17/src/openssl/crypto.c
Examining data/tinc-1.1~pre17/src/openssl/cipher.c
Examining data/tinc-1.1~pre17/src/meta.c
Examining data/tinc-1.1~pre17/src/control_common.h
Examining data/tinc-1.1~pre17/src/logger.h
Examining data/tinc-1.1~pre17/src/splay_tree.c
Examining data/tinc-1.1~pre17/src/edge.h
Examining data/tinc-1.1~pre17/src/protocol.c
Examining data/tinc-1.1~pre17/src/conf.c
Examining data/tinc-1.1~pre17/src/protocol.h
Examining data/tinc-1.1~pre17/src/multicast_device.c
Examining data/tinc-1.1~pre17/src/invitation.h
Examining data/tinc-1.1~pre17/src/ethernet.h
Examining data/tinc-1.1~pre17/src/protocol_misc.c
Examining data/tinc-1.1~pre17/src/graph.h
Examining data/tinc-1.1~pre17/src/xalloc.h
Examining data/tinc-1.1~pre17/src/dropin.h
Examining data/tinc-1.1~pre17/src/nolegacy/prf.c
Examining data/tinc-1.1~pre17/src/nolegacy/crypto.c
Examining data/tinc-1.1~pre17/src/sptps_speed.c
Examining data/tinc-1.1~pre17/src/top.c
Examining data/tinc-1.1~pre17/src/info.c
Examining data/tinc-1.1~pre17/src/protocol_auth.c
Examining data/tinc-1.1~pre17/src/ipv4.h
Examining data/tinc-1.1~pre17/src/connection.c
Examining data/tinc-1.1~pre17/src/address_cache.h
Examining data/tinc-1.1~pre17/src/route.h
Examining data/tinc-1.1~pre17/src/graph.c
Examining data/tinc-1.1~pre17/src/script.c
Examining data/tinc-1.1~pre17/src/edge.c
Examining data/tinc-1.1~pre17/src/crypto.h
Examining data/tinc-1.1~pre17/src/linux/device.c
Examining data/tinc-1.1~pre17/src/upnp.c
Examining data/tinc-1.1~pre17/src/control.h
Examining data/tinc-1.1~pre17/src/netutl.c
Examining data/tinc-1.1~pre17/src/info.h
Examining data/tinc-1.1~pre17/src/rsa.h
Examining data/tinc-1.1~pre17/src/fsck.h
Examining data/tinc-1.1~pre17/src/protocol_key.c
Examining data/tinc-1.1~pre17/src/fd_device.c

FINAL RESULTS:

data/tinc-1.1~pre17/src/fsck.c:265:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
				if(chmod(fname, st.st_mode & ~077)) {
data/tinc-1.1~pre17/src/fsck.c:314:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
				if(chmod(fname, st.st_mode & ~077)) {
data/tinc-1.1~pre17/src/fsck.c:531:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
				if(chmod(fname, 0755)) {
data/tinc-1.1~pre17/src/fsck.c:573:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
				if(chmod(fname, 0755)) {
data/tinc-1.1~pre17/src/invitation.c:413:3:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		chmod(filename, 0600);
data/tinc-1.1~pre17/src/invitation.c:1037:6:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
					chmod(filename2, 0755);
data/tinc-1.1~pre17/src/invitation.c:1049:3:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
		chmod(filename2, 0755);
data/tinc-1.1~pre17/src/bsd/tunemu.c:86:2:  [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.
	vsnprintf(tunemu_error, sizeof(tunemu_error), format, vl);
data/tinc-1.1~pre17/src/bsd/tunemu.c:116:3:  [4] (shell) execle:
  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.
		execle("/sbin/kextload", "kextload", PPP_KEXT_PATH, NULL, NULL);
data/tinc-1.1~pre17/src/control.c:109:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		if(sscanf(request, "%*d %*d " MAX_STRING, name) != 1) {
data/tinc-1.1~pre17/src/cygwin/device.c:115:3:  [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(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid);
data/tinc-1.1~pre17/src/cygwin/device.c:140: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(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, device);
data/tinc-1.1~pre17/src/dropin.c:109:11:  [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.
	status = vsnprintf(*buf, len, fmt, aq);
data/tinc-1.1~pre17/src/dropin.c:119: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.
		status = vsnprintf(*buf, len, fmt, aq);
data/tinc-1.1~pre17/src/fsck.c:74:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, va);
data/tinc-1.1~pre17/src/fsck.c:197:5:  [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.
	if(access(tinc_conf, R_OK)) {
data/tinc-1.1~pre17/src/fsck.c:344:5:  [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.
	if(access(fname, R_OK)) {
data/tinc-1.1~pre17/src/fsck.c:522:6:  [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.
		if(access(fname, R_OK | X_OK)) {
data/tinc-1.1~pre17/src/fsck.c:564:6:  [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.
		if(access(fname, R_OK | X_OK)) {
data/tinc-1.1~pre17/src/info.c:36:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, ap);
data/tinc-1.1~pre17/src/info.c:81:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		int n = sscanf(line, "%d %d %4095s %4095s %4095s port %4095s %d %d %d %d %x %"PRIx32" %4095s %4095s %d %hd %hd %hd %ld %d %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64, &code, &req, node, id, host, port, &cipher, &digest, &maclength, &compression, &options, &status_union.raw, nexthop, via, &distance, &pmtu, &minmtu, &maxmtu, &last_state_change, &udp_ping_rtt, &in_packets, &in_bytes, &out_packets, &out_bytes);
data/tinc-1.1~pre17/src/invitation.c:302:6:  [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.
	if(!access(filename, F_OK)) {
data/tinc-1.1~pre17/src/invitation.c:693:6:  [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.
	if(!access(tinc_conf, F_OK)) {
data/tinc-1.1~pre17/src/invitation.c:970:14:  [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.
		if((size_t)snprintf(newbase, sizeof(newbase), CONFDIR SLASH "tinc" SLASH "%s", line) >= sizeof(newbase)) {
data/tinc-1.1~pre17/src/invitation.c:1026:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
					if(system(command)) {
data/tinc-1.1~pre17/src/invitation.c:1130:5:  [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.
	if(access(confbase, R_OK | W_OK | X_OK)) {
data/tinc-1.1~pre17/src/invitation.c:1136:36:  [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.
	if((netname || confbasegiven) && !access(tinc_conf, F_OK)) {
data/tinc-1.1~pre17/src/logger.c:129: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 len = vsnprintf(message, sizeof(message), format, ap);
data/tinc-1.1~pre17/src/logger.c:145: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 len = vsnprintf(message, msglen, format, ap);
data/tinc-1.1~pre17/src/logger.h:75:96:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
extern void logger(int level, int priority, const char *format, ...) __attribute__((__format__(printf, 3, 4)));
data/tinc-1.1~pre17/src/mingw/device.c:164:3:  [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(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, adapterid);
data/tinc-1.1~pre17/src/mingw/device.c:191:3:  [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(tapname, sizeof(tapname), USERMODEDEVICEDIR "%s" TAPSUFFIX, device);
data/tinc-1.1~pre17/src/names.c:109:6:  [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.
		if(access(LOCALSTATEDIR, R_OK | W_OK | X_OK)) {
data/tinc-1.1~pre17/src/names.c:114:3:  [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(fname, sizeof(fname), LOCALSTATEDIR SLASH "run" SLASH "%s.pid", identname);
data/tinc-1.1~pre17/src/names.c:116:6:  [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.
		if(access(fname, R_OK)) {
data/tinc-1.1~pre17/src/names.c:119:8:  [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.
			if(!access(fname, R_OK)) {
data/tinc-1.1~pre17/src/net_socket.c:428:15:  [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.
	int result = system(command);
data/tinc-1.1~pre17/src/protocol.c:75:8:  [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.
	len = vsnprintf(request, sizeof(request), format, args);
data/tinc-1.1~pre17/src/protocol.h:83:101:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
extern bool send_request(struct connection_t *c, const char *format, ...) __attribute__((__format__(printf, 2, 3)));
data/tinc-1.1~pre17/src/protocol_auth.c:190:6:  [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.
	if(!access(filename, F_OK)) {
data/tinc-1.1~pre17/src/protocol_auth.c:601:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d %d %d %d %d " MAX_STRING, &cipher, &digest, &maclength, &compression, hexkey) != 5) {
data/tinc-1.1~pre17/src/protocol_auth.c:696:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d " MAX_STRING, buffer) != 1) {
data/tinc-1.1~pre17/src/protocol_auth.c:756:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d " MAX_STRING, hishash) != 1) {
data/tinc-1.1~pre17/src/protocol_auth.c:896:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d " MAX_STRING, pubkey) != 1) {
data/tinc-1.1~pre17/src/protocol_edge.c:77:24:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	int parameter_count = sscanf(request, "%*d %*x "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING" %x %d "MAX_STRING" "MAX_STRING,
data/tinc-1.1~pre17/src/protocol_edge.c:232:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d %*x "MAX_STRING" "MAX_STRING, from_name, to_name) != 2) {
data/tinc-1.1~pre17/src/protocol_key.c:66:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d %*x " MAX_STRING, name) != 1) {
data/tinc-1.1~pre17/src/protocol_key.c:152:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		if(sscanf(request, "%*d %*s %*s %*d " MAX_STRING, buf) != 1 || !(len = b64decode(buf, buf, strlen(buf)))) {
data/tinc-1.1~pre17/src/protocol_key.c:213:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		if(sscanf(request, "%*d %*s %*s %*d " MAX_STRING, pubkey) != 1 || !(from->ecdsa = ecdsa_set_base64_public_key(pubkey))) {
data/tinc-1.1~pre17/src/protocol_key.c:237:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		if(sscanf(request, "%*d %*s %*s %*d " MAX_STRING, buf) != 1 || !(len = b64decode(buf, buf, strlen(buf)))) {
data/tinc-1.1~pre17/src/protocol_key.c:398:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d "MAX_STRING" "MAX_STRING" "MAX_STRING" %d %d %d %d "MAX_STRING" "MAX_STRING,
data/tinc-1.1~pre17/src/protocol_misc.c:217:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d "MAX_STRING" "MAX_STRING" "MAX_STRING" "MAX_STRING, from_name, to_name, from_address, from_port) != 4) {
data/tinc-1.1~pre17/src/protocol_subnet.c:51:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
data/tinc-1.1~pre17/src/protocol_subnet.c:167:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if(sscanf(request, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
data/tinc-1.1~pre17/src/script.c:166:17:  [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.
			if((found = !access(fullname, F_OK))) {
data/tinc-1.1~pre17/src/script.c:179:6:  [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.
		if(access(scriptname, F_OK)) {
data/tinc-1.1~pre17/src/script.c:197:15:  [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.
	int status = system(command);
data/tinc-1.1~pre17/src/sptps.c:64:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, ap);
data/tinc-1.1~pre17/src/sptps_keypair.c:36:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, ap);
data/tinc-1.1~pre17/src/subnet_parse.c:449:14:  [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.
				result = snprintf(netstr, len, *format, ":::");
data/tinc-1.1~pre17/src/tincctl.c:621:9:  [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.
	blen = vsnprintf(buffer, sizeof(buffer), format, ap);
data/tinc-1.1~pre17/src/tincctl.c:1028:8:  [4] (shell) execvp:
  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.
		exit(execvp(c, nargv));
data/tinc-1.1~pre17/src/tincctl.c:1325:12:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
			int n = sscanf(line, "%*d %*d %4095s %4095s %4095s port %4095s %d %d %d %d %x %x %4095s %4095s %d %hd %hd %hd %ld %d %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64, node, id, host, port, &cipher, &digest, &maclength, &compression, &options, &status_int, nexthop, via, &distance, &pmtu, &minmtu, &maxmtu, &last_state_change, &udp_ping_rtt, &in_packets, &in_bytes, &out_packets, &out_bytes);
data/tinc-1.1~pre17/src/tincctl.c:1355:5:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
				printf("%s id %s at %s port %s cipher %d digest %d maclength %d compression %d options %x status %04x nexthop %s via %s distance %d pmtu %d (min %d max %d) rx %"PRIu64" %"PRIu64" tx %"PRIu64" %"PRIu64,
data/tinc-1.1~pre17/src/tincctl.c:2197:6:  [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.
	if(!access(tinc_conf, F_OK)) {
data/tinc-1.1~pre17/src/tincctl.c:2284:5:  [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.
	if(access(filename, F_OK)) {
data/tinc-1.1~pre17/src/tincctl.c:2452:15:  [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.
	int result = system(command);
data/tinc-1.1~pre17/src/tincctl.c:2597:18:  [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.
			if(!force && !access(filename, F_OK)) {
data/tinc-1.1~pre17/src/tincctl.c:2715:7:  [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.
		if(!access(fname, R_OK)) {
data/tinc-1.1~pre17/src/tincctl.c:2924:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	if(sscanf(data, "Signature = %s %ld %s", signer, &t, sig) != 3 || strlen(sig) != 86 || !t || !check_id(signer)) {
data/tinc-1.1~pre17/src/top.c:95:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
		int n = sscanf(line, "%d %d %4095s %"PRIu64" %"PRIu64" %"PRIu64" %"PRIu64, &code, &req, name, &in_packets, &in_bytes, &out_packets, &out_bytes);
data/tinc-1.1~pre17/src/xalloc.h:70:15:  [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 result = vsnprintf(buf, sizeof(buf), fmt, ap);
data/tinc-1.1~pre17/src/xalloc.h:88:90:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static inline int xasprintf(char **strp, const char *fmt, ...) __attribute__((__format__(printf, 2, 3)));
data/tinc-1.1~pre17/src/getopt.c:205: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.
char *getenv();
data/tinc-1.1~pre17/src/getopt.c:394:20:  [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.
	posixly_correct = getenv("POSIXLY_CORRECT");
data/tinc-1.1~pre17/src/getopt.c:964:1:  [3] (buffer) getopt:
  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.
getopt(argc, argv, optstring)
data/tinc-1.1~pre17/src/getopt.c:993:7:  [3] (buffer) getopt:
  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.
		c = getopt(argc, argv, "abc:d:0123456789");
data/tinc-1.1~pre17/src/getopt.h:108:12:  [3] (buffer) getopt:
  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.
extern int getopt(int argc, char *const *argv, const char *shortopts);
data/tinc-1.1~pre17/src/getopt.h:110:12:  [3] (buffer) getopt:
  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.
extern int getopt();
data/tinc-1.1~pre17/src/getopt.h:112:12:  [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.
extern int getopt_long(int argc, char *const *argv, const char *shortopts,
data/tinc-1.1~pre17/src/getopt.h:124:12:  [3] (buffer) getopt:
  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.
extern int getopt();
data/tinc-1.1~pre17/src/getopt.h:125:12:  [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.
extern int getopt_long();
data/tinc-1.1~pre17/src/getopt1.c:68:1:  [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.
getopt_long(argc, argv, options, long_options, opt_index)
data/tinc-1.1~pre17/src/getopt1.c:122:7:  [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.
		c = getopt_long(argc, argv, "abc:d:0123456789",
data/tinc-1.1~pre17/src/invitation.c:1015:27:  [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 *editor = getenv("VISUAL");
data/tinc-1.1~pre17/src/invitation.c:1017:16:  [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.
						editor = getenv("EDITOR");
data/tinc-1.1~pre17/src/net_setup.c:1081:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(!do_detach && getenv("LISTEN_FDS")) {
data/tinc-1.1~pre17/src/net_setup.c:1085: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.
		listen_sockets = atoi(getenv("LISTEN_FDS"));
data/tinc-1.1~pre17/src/script.c:145: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 *pathext = getenv("PATHEXT") ? : ".COM;.EXE;.BAT;.CMD";
data/tinc-1.1~pre17/src/sptps_keypair.c:60:13:  [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.
	while((r = getopt_long(argc, argv, "", long_options, &option_index)) != EOF) {
data/tinc-1.1~pre17/src/sptps_test.c:140:13:  [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.
	while((r = getopt_long(argc, argv, "dqrstwL:W:v46", long_options, &option_index)) != EOF) {
data/tinc-1.1~pre17/src/sptps_test.c:221:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(NULL));
data/tinc-1.1~pre17/src/tincctl.c:171:13:  [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.
	while((r = getopt_long(argc, argv, "+bc:n:", long_options, &option_index)) != EOF) {
data/tinc-1.1~pre17/src/tincctl.c:214:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(!netname && (netname = getenv("NETNAME"))) {
data/tinc-1.1~pre17/src/tincctl.c:2442:23:  [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 *editor = getenv("VISUAL");
data/tinc-1.1~pre17/src/tincctl.c:2444:12:  [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.
		editor = getenv("EDITOR");
data/tinc-1.1~pre17/src/tincctl.c:3336:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(NULL));
data/tinc-1.1~pre17/src/tincd.c:152:13:  [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.
	while((r = getopt_long(argc, argv, "c:DLd::n:so:RU:", long_options, &option_index)) != EOF) {
data/tinc-1.1~pre17/src/tincd.c:268:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(!netname && (netname = getenv("NETNAME"))) {
data/tinc-1.1~pre17/src/tincd.c:322:6:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
		if(chroot(confbase) != 0 || chdir("/") != 0) {
data/tinc-1.1~pre17/src/tincd.c:402:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *umbstr = getenv("TINC_UMBILICAL");
data/tinc-1.1~pre17/src/tincd.c:426:5:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid()) {
data/tinc-1.1~pre17/src/tincd.c:426:34:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid()) {
data/tinc-1.1~pre17/src/tincd.c:439:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(now.tv_sec + now.tv_usec);
data/tinc-1.1~pre17/src/utils.c:254:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		char *envname = getenv(name + 1);
data/tinc-1.1~pre17/src/address_cache.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(ai->ai_addr, &e->reverse->address, ai->ai_addrlen);
data/tinc-1.1~pre17/src/address_cache.c:106: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/address_cache.c:108:13:  [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 *fp = fopen(fname, "wb");
data/tinc-1.1~pre17/src/address_cache.c:184: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(ai->ai_addr, cache->aip->ai_addr, ai->ai_addrlen);
data/tinc-1.1~pre17/src/address_cache.c:220: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/address_cache.c:222:13:  [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 *fp = fopen(fname, "rb");
data/tinc-1.1~pre17/src/bsd/device.c:110: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 name[64] = "";
data/tinc-1.1~pre17/src/bsd/device.c:191: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 dynamic_name[256] = "";
data/tinc-1.1~pre17/src/bsd/device.c:203: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).
		device_fd = open(device, O_RDWR | O_NONBLOCK);
data/tinc-1.1~pre17/src/bsd/device.c:478: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(DATA(packet) + 10, &type, sizeof(type));
data/tinc-1.1~pre17/src/bsd/tunemu.c:75:1:  [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 tunemu_error[ERROR_BUFFER_SIZE];
data/tinc-1.1~pre17/src/bsd/tunemu.c:101:2:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	open("/dev/null", O_RDWR, 0);
data/tinc-1.1~pre17/src/bsd/tunemu.c:221: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 errbuf[PCAP_ERRBUF_SIZE];
data/tinc-1.1~pre17/src/bsd/tunemu.c:264:20:  [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).
	int unit_number = atoi(device + 3);
data/tinc-1.1~pre17/src/bsd/tunemu.c:289:21:  [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).
		ppp_unit_number = atoi(device + 3);
data/tinc-1.1~pre17/src/bsd/tunemu.c:341: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_buffer + 2, length);
data/tinc-1.1~pre17/src/bsd/tunemu.c:354: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 + 4, buffer, length);
data/tinc-1.1~pre17/src/bsd/tunemu.h:23: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.
typedef char tunemu_device[7];
data/tinc-1.1~pre17/src/buffer.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(buffer_prepare(buffer, size), data, size);
data/tinc-1.1~pre17/src/chacha-poly1305/chacha.c:47: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 sigma[16] = "expand 32-byte k";
data/tinc-1.1~pre17/src/chacha-poly1305/chacha.c:48: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 tau[16] = "expand 16-byte k";
data/tinc-1.1~pre17/src/chacha-poly1305/poly1305.c:27:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
data/tinc-1.1~pre17/src/chacha-poly1305/poly1305.c:27:66:  [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.
poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
data/tinc-1.1~pre17/src/chacha-poly1305/poly1305.c:27:104:  [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.
poly1305_auth(unsigned char out[POLY1305_TAGLEN], const unsigned char *m, size_t inlen, const unsigned char key[POLY1305_KEYLEN]) {
data/tinc-1.1~pre17/src/chacha-poly1305/poly1305.c:38: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.
	unsigned char mp[16];
data/tinc-1.1~pre17/src/conf.c:309: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[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/conf.c:316:7:  [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 = fopen(fname, "r");
data/tinc-1.1~pre17/src/conf.c:402: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/conf.c:413: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 dname[PATH_MAX];
data/tinc-1.1~pre17/src/conf.c:450: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/conf.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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/conf.c:459:13:  [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 *fp = fopen(fname, "a");
data/tinc-1.1~pre17/src/control.c:36:1:  [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 controlcookie[65];
data/tinc-1.1~pre17/src/control.c:106: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 name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/control.c:151: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(pidfilename, "w");
data/tinc-1.1~pre17/src/cygwin/device.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 regpath[1024];
data/tinc-1.1~pre17/src/cygwin/device.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 adapterid[1024];
data/tinc-1.1~pre17/src/cygwin/device.c:52: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 adaptername[1024];
data/tinc-1.1~pre17/src/cygwin/device.c:53: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 tapname[1024];
data/tinc-1.1~pre17/src/cygwin/device.c:186: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[MTU];
data/tinc-1.1~pre17/src/dropin.c:71: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/null", O_RDWR);
data/tinc-1.1~pre17/src/ed25519/ecdsa.c:67: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 line[1024];
data/tinc-1.1~pre17/src/ed25519/ecdsa.c:105: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, line, len);
data/tinc-1.1~pre17/src/ed25519/ecdsagen.c:53: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 base64[65];
data/tinc-1.1~pre17/src/ed25519/fe.c:461: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.
	unsigned char s[32];
data/tinc-1.1~pre17/src/ed25519/fe.c:479: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.
	unsigned char s[32];
data/tinc-1.1~pre17/src/ed25519/ge.c:68: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.
	signed char aslide[256];
data/tinc-1.1~pre17/src/ed25519/ge.c:69: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.
	signed char bslide[256];
data/tinc-1.1~pre17/src/ed25519/ge.c:387: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.
	signed char e[64];
data/tinc-1.1~pre17/src/ed25519/key_exchange.c:5: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.
	unsigned char e[32];
data/tinc-1.1~pre17/src/ed25519/sha512.h:12: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.
	unsigned char buf[128];
data/tinc-1.1~pre17/src/ed25519/sign.c:9: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.
	unsigned char hram[64];
data/tinc-1.1~pre17/src/ed25519/sign.c:10: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.
	unsigned char r[64];
data/tinc-1.1~pre17/src/ed25519/verify.c:48: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.
	unsigned char h[64];
data/tinc-1.1~pre17/src/ed25519/verify.c:49: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.
	unsigned char checker[32];
data/tinc-1.1~pre17/src/fsck.c:45: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/tinc-1.1~pre17/src/fsck.c:93: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(fname, "r");
data/tinc-1.1~pre17/src/fsck.c:100: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 line[2048];
data/tinc-1.1~pre17/src/fsck.c:225: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/fsck.c:226: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 dname[PATH_MAX];
data/tinc-1.1~pre17/src/fsck.c:240:13:  [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(fname, "r");
data/tinc-1.1~pre17/src/fsck.c:289:13:  [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(fname, "r");
data/tinc-1.1~pre17/src/fsck.c:353:6:  [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).
	f = fopen(fname, "r");
data/tinc-1.1~pre17/src/fsck.c:365:15:  [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(fname, "a");
data/tinc-1.1~pre17/src/fsck.c:388: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 buf1[len], buf2[len], buf3[len];
data/tinc-1.1~pre17/src/fsck.c:419:6:  [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).
	f = fopen(fname, "r");
data/tinc-1.1~pre17/src/fsck.c:437:15:  [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(fname, "a");
data/tinc-1.1~pre17/src/gcrypt/cipher.c:158: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(key, cipher->key, cipher->keylen + cipher->blklen);
data/tinc-1.1~pre17/src/gcrypt/cipher.c:162: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->key, key, cipher->keylen + cipher->blklen);
data/tinc-1.1~pre17/src/gcrypt/cipher.c:171: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->key, key + len - cipher->keylen, cipher->keylen + cipher->blklen);
data/tinc-1.1~pre17/src/gcrypt/cipher.c:172: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->key + cipher->keylen, key + len - cipher->keylen - cipher->blklen, cipher->blklen);
data/tinc-1.1~pre17/src/gcrypt/digest.c:155: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(outdata, tmpdata, digest->maclength);
data/tinc-1.1~pre17/src/gcrypt/digest.c:157: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 tmpdata[len];
data/tinc-1.1~pre17/src/gcrypt/digest.c:159: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(outdata, tmpdata, digest->maclength);
data/tinc-1.1~pre17/src/gcrypt/digest.c:167: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 outdata[len];
data/tinc-1.1~pre17/src/gcrypt/prf.c:35: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 tmp[blklen + mdlen];
data/tinc-1.1~pre17/src/gcrypt/prf.c:39: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(tmp, key, keylen);
data/tinc-1.1~pre17/src/gcrypt/prf.c:89: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 data[mdlen + seedlen];
data/tinc-1.1~pre17/src/gcrypt/prf.c:91: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 + mdlen, seed, seedlen);
data/tinc-1.1~pre17/src/gcrypt/prf.c:93: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 hash[mdlen];
data/tinc-1.1~pre17/src/gcrypt/prf.c:114: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(out, hash, outlen);
data/tinc-1.1~pre17/src/gcrypt/rsa.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 line[1024];
data/tinc-1.1~pre17/src/gcrypt/rsagen.c:29: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 b64e[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
data/tinc-1.1~pre17/src/gcrypt/rsagen.c:35: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 line[1024];
data/tinc-1.1~pre17/src/gcrypt/rsagen.c:142: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, seqbuf, seqlen);
data/tinc-1.1~pre17/src/gcrypt/rsagen.c:164: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, tmpbuf, tmplen);
data/tinc-1.1~pre17/src/getopt.c:325: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(new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
data/tinc-1.1~pre17/src/getopt.c:432:6:  [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(__getopt_nonoption_flags, orig_str, len);
data/tinc-1.1~pre17/src/hash.c:81: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(hash->keys + i * hash->size, key, hash->size);
data/tinc-1.1~pre17/src/hash.c:102: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(hash->keys + i * hash->size, key, hash->size);
data/tinc-1.1~pre17/src/ifconfig.c:90: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 address_str[MAXNETSTR];
data/tinc-1.1~pre17/src/ifconfig.c:172: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 subnet_str[MAXNETSTR] = "", gateway_str[MAXNETSTR] = "";
data/tinc-1.1~pre17/src/info.c:57: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 line[4096];
data/tinc-1.1~pre17/src/info.c:59: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 node[4096];
data/tinc-1.1~pre17/src/info.c:60: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 id[4096];
data/tinc-1.1~pre17/src/info.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 from[4096];
data/tinc-1.1~pre17/src/info.c:62: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 to[4096];
data/tinc-1.1~pre17/src/info.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 subnet[4096];
data/tinc-1.1~pre17/src/info.c:64: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 host[4096];
data/tinc-1.1~pre17/src/info.c:65: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 port[4096];
data/tinc-1.1~pre17/src/info.c:66: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 via[4096];
data/tinc-1.1~pre17/src/info.c:67: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 nexthop[4096];
data/tinc-1.1~pre17/src/info.c:113: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 timestr[32] = "never";
data/tinc-1.1~pre17/src/info.c:262: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 line[4096];
data/tinc-1.1~pre17/src/info.c:263: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 netstr[4096];
data/tinc-1.1~pre17/src/info.c:264: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 owner[4096];
data/tinc-1.1~pre17/src/invitation.c:47: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(filename, "r");
data/tinc-1.1~pre17/src/invitation.c:105: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 filename[PATH_MAX] = {0};
data/tinc-1.1~pre17/src/invitation.c:230:13:  [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(filename, "a");
data/tinc-1.1~pre17/src/invitation.c:262:13:  [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 *in = fopen(filename, "r");
data/tinc-1.1~pre17/src/invitation.c:269: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/tinc-1.1~pre17/src/invitation.c:299: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/invitation.c:313: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 node[4096];
data/tinc-1.1~pre17/src/invitation.c:356: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 invname[PATH_MAX];
data/tinc-1.1~pre17/src/invitation.c:392: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(filename, "r");
data/tinc-1.1~pre17/src/invitation.c:406:7:  [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).
		f = fopen(filename, "w");
data/tinc-1.1~pre17/src/invitation.c:442: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 hash[64];
data/tinc-1.1~pre17/src/invitation.c:448: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 cookie[25];
data/tinc-1.1~pre17/src/invitation.c:452: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[18 + strlen(fingerprint)];
data/tinc-1.1~pre17/src/invitation.c:453: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 cookiehash[64];
data/tinc-1.1~pre17/src/invitation.c:454: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, cookie, 18);
data/tinc-1.1~pre17/src/invitation.c:455: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 + 18, fingerprint, sizeof(buf) - 18);
data/tinc-1.1~pre17/src/invitation.c:463:12:  [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 ifd = open(filename, O_RDWR | O_CREAT | O_EXCL, 0600);
data/tinc-1.1~pre17/src/invitation.c:489:13:  [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 *tc = fopen(tinc_conf, "r");
data/tinc-1.1~pre17/src/invitation.c:492: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[1024];
data/tinc-1.1~pre17/src/invitation.c:512: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 filename2[PATH_MAX];
data/tinc-1.1~pre17/src/invitation.c:538: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.
static char cookie[18];
data/tinc-1.1~pre17/src/invitation.c:544: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.
static char cookie[18], hash[18];
data/tinc-1.1~pre17/src/invitation.c:556: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.
	static char line[1024];
data/tinc-1.1~pre17/src/invitation.c:569: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(line, *data, len);
data/tinc-1.1~pre17/src/invitation.c:605: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.
	static char value[1024];
data/tinc-1.1~pre17/src/invitation.c:643: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(value, p, e - p);
data/tinc-1.1~pre17/src/invitation.c:657: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 name[len + 1];
data/tinc-1.1~pre17/src/invitation.c:658: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(name, temp_name, len);
data/tinc-1.1~pre17/src/invitation.c:676: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 temp_netname[32];
data/tinc-1.1~pre17/src/invitation.c:717: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(tinc_conf, "w");
data/tinc-1.1~pre17/src/invitation.c:726: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/invitation.c:728:13:  [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 *fh = fopen(filename, "w");
data/tinc-1.1~pre17/src/invitation.c:737:15:  [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 *finv = fopen(filename, "w");
data/tinc-1.1~pre17/src/invitation.c:750:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *fup = fopen(filename, "w");
data/tinc-1.1~pre17/src/invitation.c:863:7:  [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).
		f = fopen(filename, "w");
data/tinc-1.1~pre17/src/invitation.c:968: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 newbase[PATH_MAX];
data/tinc-1.1~pre17/src/invitation.c:984: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 filename2[PATH_MAX];
data/tinc-1.1~pre17/src/invitation.c:990:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			FILE *fup = fopen(filename, "r");
data/tinc-1.1~pre17/src/invitation.c:995: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[MAXSIZE];
data/tinc-1.1~pre17/src/invitation.c:1088: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(data + datalen, msg, len);
data/tinc-1.1~pre17/src/invitation.c:1270: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 hisname[4096] = "";
data/tinc-1.1~pre17/src/invitation.c:1283: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 hishash[64];
data/tinc-1.1~pre17/src/linux/device.c:46: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.
static char ifrname[IFNAMSIZ];
data/tinc-1.1~pre17/src/linux/device.c:59:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	device_fd = open(device, O_RDWR | O_NONBLOCK);
data/tinc-1.1~pre17/src/linux/device.c:125: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(mymac.x, ifr_mac.ifr_hwaddr.sa_data, ETH_ALEN);
data/tinc-1.1~pre17/src/logger.c:44: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 timestr[32] = "";
data/tinc-1.1~pre17/src/logger.c:126: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 message[1024] = "";
data/tinc-1.1~pre17/src/logger.c:142: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 message[1024];
data/tinc-1.1~pre17/src/logger.c:176:13:  [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).
		logfile = fopen(logfilename, "a");
data/tinc-1.1~pre17/src/logger.c:219:18:  [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 *newfile = fopen(logfilename, "a");
data/tinc-1.1~pre17/src/meta.c:153: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 *)data)[length - 1] = 0;
data/tinc-1.1~pre17/src/meta.c:163: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 inbuf[MAXBUFSIZE];
data/tinc-1.1~pre17/src/mingw/device.c:98: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 regpath[1024];
data/tinc-1.1~pre17/src/mingw/device.c:99: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 adapterid[1024];
data/tinc-1.1~pre17/src/mingw/device.c:100: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 adaptername[1024];
data/tinc-1.1~pre17/src/mingw/device.c:101: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 tapname[1024];
data/tinc-1.1~pre17/src/mingw/device.c:330: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(&device_write_packet, packet, sizeof(*packet));
data/tinc-1.1~pre17/src/multicast_device.c:64:9:  [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).
		ttl = atoi(space);
data/tinc-1.1~pre17/src/names.c:44: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 installdir[1024] = "";
data/tinc-1.1~pre17/src/names.c:113: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/names.c:152: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(unixsocketname, pidfilename, len);
data/tinc-1.1~pre17/src/net.c:336: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/net_packet.c:64: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.
static char lzo_wrkmem[LZO1X_999_MEM_COMPRESS > LZO1X_1_MEM_COMPRESS ? LZO1X_999_MEM_COMPRESS : LZO1X_1_MEM_COMPRESS];
data/tinc-1.1~pre17/src/net_packet.c:122: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(DATA(packet) + 1, &len16, 2);
data/tinc-1.1~pre17/src/net_packet.c:151: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(&len16, DATA(packet) + 1, 2);
data/tinc-1.1~pre17/src/net_packet.c: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(dest, source, len);
data/tinc-1.1~pre17/src/net_packet.c:245: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, source, len);
data/tinc-1.1~pre17/src/net_packet.c:503: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(&outpkt), buffer, len);
data/tinc-1.1~pre17/src/net_packet.c:768: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(SEQNO(inpkt), &seqno, sizeof(seqno));
data/tinc-1.1~pre17/src/net_packet.c:873: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[len + sizeof(to->id) + sizeof(from->id)];
data/tinc-1.1~pre17/src/net_packet.c:875: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(buf_ptr, &to->id, sizeof(to->id));
data/tinc-1.1~pre17/src/net_packet.c:877: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(buf_ptr, &from->id, sizeof(from->id));
data/tinc-1.1~pre17/src/net_packet.c:879: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(buf_ptr, data, len);
data/tinc-1.1~pre17/src/net_packet.c: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 buf[len * 4 / 3 + 5];
data/tinc-1.1~pre17/src/net_packet.c:904: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[len + overhead];
data/tinc-1.1~pre17/src/net_packet.c:911: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(buf_ptr, &nullid, sizeof(nullid));
data/tinc-1.1~pre17/src/net_packet.c:914: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(buf_ptr, &to->id, sizeof(to->id));
data/tinc-1.1~pre17/src/net_packet.c:918: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_ptr, &from->id, sizeof(from->id));
data/tinc-1.1~pre17/src/net_packet.c:924: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_ptr, data, len);
data/tinc-1.1~pre17/src/net_packet.c:992: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(DATA(&inpkt), data, len);
data/tinc-1.1~pre17/src/net_packet.c:1030: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(DATA(&inpkt) + offset, data, len);
data/tinc-1.1~pre17/src/net_packet.c:1451: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(DATA(packet), mymac.x, ETH_ALEN);
data/tinc-1.1~pre17/src/net_packet.c:1453: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(DATA(packet) + ETH_ALEN, DATA(packet), ETH_ALEN);
data/tinc-1.1~pre17/src/net_setup.c:96:7:  [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 = fopen(pubname, "r");
data/tinc-1.1~pre17/src/net_setup.c:142:7:  [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 = fopen(fname, "r");
data/tinc-1.1~pre17/src/net_setup.c:182:7:  [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 = fopen(fname, "r");
data/tinc-1.1~pre17/src/net_setup.c:212:7:  [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 = fopen(fname, "r");
data/tinc-1.1~pre17/src/net_setup.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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/net_setup.c:262:7:  [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 = fopen(fname, "r");
data/tinc-1.1~pre17/src/net_setup.c:303:7:  [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 = fopen(fname, "r");
data/tinc-1.1~pre17/src/net_setup.c:365: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 dname[PATH_MAX];
data/tinc-1.1~pre17/src/net_setup.c:789: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(&listen_socket[listen_sockets].sa, aip->ai_addr, aip->ai_addrlen);
data/tinc-1.1~pre17/src/net_setup.c:888:6:  [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).
	if(!atoi(myport)) {
data/tinc-1.1~pre17/src/net_setup.c:897: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(&sa, ai->ai_addr, ai->ai_addrlen);
data/tinc-1.1~pre17/src/net_setup.c:1085:20:  [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).
		listen_sockets = atoi(getenv("LISTEN_FDS"));
data/tinc-1.1~pre17/src/net_setup.c:1122: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(&listen_socket[i].sa, &sa, salen);
data/tinc-1.1~pre17/src/net_setup.c:1159:24:  [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).
	if(!port_specified || atoi(myport) == 0) {
data/tinc-1.1~pre17/src/net_socket.c:537: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(&c->address, sa, SALEN(sa->sa));
data/tinc-1.1~pre17/src/net_socket.c:698: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(&prev_sa, &sa, sizeof(sa));
data/tinc-1.1~pre17/src/netutl.c:74: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(&result, ai->ai_addr, ai->ai_addrlen);
data/tinc-1.1~pre17/src/netutl.c:81: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 address[NI_MAXHOST];
data/tinc-1.1~pre17/src/netutl.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 port[NI_MAXSERV];
data/tinc-1.1~pre17/src/netutl.c:132: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 address[NI_MAXHOST] = "unknown";
data/tinc-1.1~pre17/src/netutl.c:133: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 port[NI_MAXSERV] = "unknown";
data/tinc-1.1~pre17/src/netutl.c:257:27:  [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).
	uint16_t portnum = htons(atoi(port));
data/tinc-1.1~pre17/src/node.c:123: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.
	unsigned char buf[64];
data/tinc-1.1~pre17/src/node.c:200: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 id[2 * sizeof(n->id) + 1];
data/tinc-1.1~pre17/src/nolegacy/crypto.c:29:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	random_fd = open("/dev/urandom", O_RDONLY);
data/tinc-1.1~pre17/src/nolegacy/crypto.c:32: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).
		random_fd = open("/dev/random", O_RDONLY);
data/tinc-1.1~pre17/src/nolegacy/prf.c:35: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 tmp[blklen + mdlen];
data/tinc-1.1~pre17/src/nolegacy/prf.c:39: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(tmp, key, keylen);
data/tinc-1.1~pre17/src/nolegacy/prf.c:89: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 data[mdlen + seedlen];
data/tinc-1.1~pre17/src/nolegacy/prf.c:91: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 + mdlen, seed, seedlen);
data/tinc-1.1~pre17/src/nolegacy/prf.c:93: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 hash[mdlen];
data/tinc-1.1~pre17/src/nolegacy/prf.c:114: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(out, hash, outlen);
data/tinc-1.1~pre17/src/openssl/crypto.c:33:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	random_fd = open("/dev/urandom", O_RDONLY);
data/tinc-1.1~pre17/src/openssl/crypto.c:36: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).
		random_fd = open("/dev/random", O_RDONLY);
data/tinc-1.1~pre17/src/openssl/digest.c:108: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.
	unsigned char tmpdata[len];
data/tinc-1.1~pre17/src/openssl/digest.c:134: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(outdata, tmpdata, digest->maclength);
data/tinc-1.1~pre17/src/openssl/digest.c:140: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.
	unsigned char outdata[len];
data/tinc-1.1~pre17/src/openssl/prf.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 data[len + seedlen];
data/tinc-1.1~pre17/src/openssl/prf.c:52: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 + len, seed, seedlen);
data/tinc-1.1~pre17/src/openssl/prf.c:54: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 hash[len];
data/tinc-1.1~pre17/src/process.c:56: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 command[4096] = "\"";
data/tinc-1.1~pre17/src/protocol.c:67: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 request[MAXBUFSIZE];
data/tinc-1.1~pre17/src/protocol.c:85:11:  [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).
	int id = atoi(request);
data/tinc-1.1~pre17/src/protocol.c:104:79:  [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).
	logger(DEBUG_META, LOG_DEBUG, "Forwarding %s from %s (%s): %s", request_name[atoi(request)], from->name, from->hostname, request);
data/tinc-1.1~pre17/src/protocol.c:108: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 tmp[len + 1];
data/tinc-1.1~pre17/src/protocol.c:109: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(tmp, request, len);
data/tinc-1.1~pre17/src/protocol.c:131:14:  [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).
	int reqno = atoi(request);
data/tinc-1.1~pre17/src/protocol_auth.c:72: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 s4req[9 + (proxyuser ? strlen(proxyuser) : 0)];
data/tinc-1.1~pre17/src/protocol_auth.c:75: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(s4req + 2, &c->address.in.sin_port, 2);
data/tinc-1.1~pre17/src/protocol_auth.c:76: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(s4req + 4, &c->address.in.sin_addr, 4);
data/tinc-1.1~pre17/src/protocol_auth.c:79: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(s4req + 8, proxyuser, strlen(proxyuser));
data/tinc-1.1~pre17/src/protocol_auth.c:95: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 s5req[len];
data/tinc-1.1~pre17/src/protocol_auth.c:104: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(s5req + i, proxyuser, strlen(proxyuser));
data/tinc-1.1~pre17/src/protocol_auth.c:107: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(s5req + i, proxypass, strlen(proxypass));
data/tinc-1.1~pre17/src/protocol_auth.c:120: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(s5req + i, &c->address.in.sin_addr, 4);
data/tinc-1.1~pre17/src/protocol_auth.c:122: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(s5req + i, &c->address.in.sin_port, 2);
data/tinc-1.1~pre17/src/protocol_auth.c:127: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(s5req + i, &c->address.in6.sin6_addr, 16);
data/tinc-1.1~pre17/src/protocol_auth.c:129: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(s5req + i, &c->address.in6.sin6_port, 2);
data/tinc-1.1~pre17/src/protocol_auth.c:187: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/protocol_auth.c:195: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(filename, "w");
data/tinc-1.1~pre17/src/protocol_auth.c:242: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 hashbuf[18 + strlen(fingerprint)];
data/tinc-1.1~pre17/src/protocol_auth.c:243: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 cookie[64];
data/tinc-1.1~pre17/src/protocol_auth.c:244: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(hashbuf, data, 18);
data/tinc-1.1~pre17/src/protocol_auth.c:245: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(hashbuf + 18, fingerprint, sizeof(hashbuf) - 18);
data/tinc-1.1~pre17/src/protocol_auth.c:250: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 filename[PATH_MAX], usedname[PATH_MAX];
data/tinc-1.1~pre17/src/protocol_auth.c:279: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(usedname, "r");
data/tinc-1.1~pre17/src/protocol_auth.c:287: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/tinc-1.1~pre17/src/protocol_auth.c:333: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 name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_auth.c:475: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 label[25 + strlen(myself->name) + strlen(c->name)];
data/tinc-1.1~pre17/src/protocol_auth.c:529: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 key[len];
data/tinc-1.1~pre17/src/protocol_auth.c:530: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 enckey[len];
data/tinc-1.1~pre17/src/protocol_auth.c:531: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 hexkey[2 * len + 1];
data/tinc-1.1~pre17/src/protocol_auth.c:595: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 hexkey[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_auth.c:598: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 enckey[len];
data/tinc-1.1~pre17/src/protocol_auth.c:599: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 key[len];
data/tinc-1.1~pre17/src/protocol_auth.c:666: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[len * 2 + 1];
data/tinc-1.1~pre17/src/protocol_auth.c:693: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[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_auth.c:730: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 digest[digestlen * 2 + 1];
data/tinc-1.1~pre17/src/protocol_auth.c:754: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 hishash[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_auth.c:866: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 pad[MAXBUFSIZE - MAXSIZE];
data/tinc-1.1~pre17/src/protocol_auth.c:894: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 pubkey[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_auth.c:939: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 hisport[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:67: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 from_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:68: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 to_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:69: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 to_address[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:70: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 to_port[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:71: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 address_local[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:72: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 port_local[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:228: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 from_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_edge.c:229: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 to_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.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 name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:106: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[len * 4 / 3 + 5];
data/tinc-1.1~pre17/src/protocol_key.c:121: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 label[25 + strlen(myself->name) + strlen(to->name)];
data/tinc-1.1~pre17/src/protocol_key.c:149: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[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:211: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 pubkey[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:234: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[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:242: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 label[25 + strlen(from->name) + strlen(myself->name)];
data/tinc-1.1~pre17/src/protocol_key.c:261: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 from_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:262: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 to_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:334: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 key[keylen * 2 + 1];
data/tinc-1.1~pre17/src/protocol_key.c:390: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 from_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:391: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 to_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:392: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 key[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_key.c:393: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 address[MAX_STRING_SIZE] = "";
data/tinc-1.1~pre17/src/protocol_key.c:394: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 port[MAX_STRING_SIZE] = "";
data/tinc-1.1~pre17/src/protocol_key.c:473: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[strlen(key)];
data/tinc-1.1~pre17/src/protocol_misc.c:212: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 from_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_misc.c:213: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 to_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_misc.c:214: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 from_address[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_misc.c:215: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 from_port[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_misc.c:324: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 from_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_misc.c:325: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 to_name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_subnet.c:36: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 netstr[MAXNETSTR];
data/tinc-1.1~pre17/src/protocol_subnet.c:46: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 subnetstr[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_subnet.c:47: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 name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_subnet.c:152: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 netstr[MAXNETSTR];
data/tinc-1.1~pre17/src/protocol_subnet.c:162: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 subnetstr[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/protocol_subnet.c:163: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 name[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/route.c:121: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(packet)[0], &DATA(packet)[6], sizeof(tmp));
data/tinc-1.1~pre17/src/route.c:122: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(packet)[6], &tmp, sizeof(tmp));
data/tinc-1.1~pre17/src/route.c:145: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(&ip, DATA(packet) + ether_size, ip_size);
data/tinc-1.1~pre17/src/route.c:218: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(packet) + ether_size, &ip, ip_size);
data/tinc-1.1~pre17/src/route.c:219: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(packet) + ether_size + ip_size, &icmp, icmp_size);
data/tinc-1.1~pre17/src/route.c:250: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(&ip6, DATA(packet) + ether_size, ip6_size);
data/tinc-1.1~pre17/src/route.c:326: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(packet) + ether_size, &ip6, ip6_size);
data/tinc-1.1~pre17/src/route.c:327: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(packet) + ether_size + ip6_size, &icmp6, icmp6_size);
data/tinc-1.1~pre17/src/route.c:504: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 netstr[MAXNETSTR];
data/tinc-1.1~pre17/src/route.c:583: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(&ip, DATA(packet) + ether_size, ip_size);
data/tinc-1.1~pre17/src/route.c:608: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(DATA(&fragment) + ether_size + ip_size, offset, len);
data/tinc-1.1~pre17/src/route.c:616: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(DATA(&fragment), DATA(packet), ether_size);
data/tinc-1.1~pre17/src/route.c:617: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(DATA(&fragment) + ether_size, &ip, ip_size);
data/tinc-1.1~pre17/src/route.c:827: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(&ip6, DATA(packet) + ether_size, ip6_size);
data/tinc-1.1~pre17/src/route.c:828: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(&ns, DATA(packet) + ether_size + ip6_size, ns_size);
data/tinc-1.1~pre17/src/route.c:831: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(&opt, DATA(packet) + ether_size + ip6_size + ns_size, opt_size);
data/tinc-1.1~pre17/src/route.c:837: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(mymac.x, DATA(packet) + ETH_ALEN, ETH_ALEN);
data/tinc-1.1~pre17/src/route.c:907: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(packet), DATA(packet) + ETH_ALEN, ETH_ALEN); /* copy destination address */
data/tinc-1.1~pre17/src/route.c:914: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(DATA(packet) + ether_size + ip6_size + ns_size + opt_size, DATA(packet) + ETH_ALEN, ETH_ALEN);        /* add fake source hard addr */
data/tinc-1.1~pre17/src/route.c:949: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(packet) + ether_size, &ip6, ip6_size);
data/tinc-1.1~pre17/src/route.c:950: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(packet) + ether_size + ip6_size, &ns, ns_size);
data/tinc-1.1~pre17/src/route.c:953: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(DATA(packet) + ether_size + ip6_size + ns_size, &opt, opt_size);
data/tinc-1.1~pre17/src/route.c:978: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(mymac.x, DATA(packet) + ETH_ALEN, ETH_ALEN);
data/tinc-1.1~pre17/src/route.c:983: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(&arp, DATA(packet) + ether_size, arp_size);
data/tinc-1.1~pre17/src/route.c:1016: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(arp.arp_tpa, arp.arp_spa, sizeof(addr));           /* swap destination and source protocol address */
data/tinc-1.1~pre17/src/route.c:1017: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(arp.arp_spa, &addr, sizeof(addr));                 /* ... */
data/tinc-1.1~pre17/src/route.c:1019: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(arp.arp_tha, arp.arp_sha, ETH_ALEN);              /* set target hard/proto addr */
data/tinc-1.1~pre17/src/route.c:1020: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(arp.arp_sha, DATA(packet) + ETH_ALEN, ETH_ALEN);  /* set source hard/proto addr */
data/tinc-1.1~pre17/src/route.c:1026: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(packet) + ether_size, &arp, arp_size);
data/tinc-1.1~pre17/src/script.c:45: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 var[len + 1];
data/tinc-1.1~pre17/src/script.c:135: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 scriptname[PATH_MAX];
data/tinc-1.1~pre17/src/script.c:148: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 fullname[scriptlen + pathlen + 1];
data/tinc-1.1~pre17/src/script.c:159: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(ext, p, q - p);
data/tinc-1.1~pre17/src/solaris/device.c:92:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if((ip_fd = open(IP_DEVICE, O_RDWR, 0)) < 0) {
data/tinc-1.1~pre17/src/solaris/device.c:97: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).
	if((device_fd = open(device, O_RDWR, 0)) < 0) {
data/tinc-1.1~pre17/src/solaris/device.c:111: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).
	int ppa = atoi(ptr);
data/tinc-1.1~pre17/src/solaris/device.c:149:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if((if_fd = open(device, O_RDWR, 0)) < 0) {
data/tinc-1.1~pre17/src/solaris/device.c:226: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).
		if((arp_fd = open(device, O_RDWR, 0)) < 0) {
data/tinc-1.1~pre17/src/sptps.c:95: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[len + 21UL];
data/tinc-1.1~pre17/src/sptps.c:101: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, &netseqno, 4);
data/tinc-1.1~pre17/src/sptps.c:103: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 + 5, data, len);
data/tinc-1.1~pre17/src/sptps.c:120: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[len + 19UL];
data/tinc-1.1~pre17/src/sptps.c:126: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, &netlen, 2);
data/tinc-1.1~pre17/src/sptps.c:128: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 + 3, data, len);
data/tinc-1.1~pre17/src/sptps.c:190: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 msg[(1 + 32 + keylen) * 2 + 1 + s->labellen];
data/tinc-1.1~pre17/src/sptps.c:191: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 sig[siglen];
data/tinc-1.1~pre17/src/sptps.c:194: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(msg + 1, s->mykex, 1 + 32 + keylen);
data/tinc-1.1~pre17/src/sptps.c:195: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(msg + 1 + 33 + keylen, s->hiskex, 1 + 32 + keylen);
data/tinc-1.1~pre17/src/sptps.c:196: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(msg + 1 + 2 * (33 + keylen), s->label, s->labellen);
data/tinc-1.1~pre17/src/sptps.c:229: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 seed[s->labellen + 64 + 13];
data/tinc-1.1~pre17/src/sptps.c:230: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(seed, "key expansion", 13);
data/tinc-1.1~pre17/src/sptps.c:233: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(seed + 13, s->mykex + 1, 32);
data/tinc-1.1~pre17/src/sptps.c:234: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(seed + 45, s->hiskex + 1, 32);
data/tinc-1.1~pre17/src/sptps.c:236: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(seed + 13, s->hiskex + 1, 32);
data/tinc-1.1~pre17/src/sptps.c:237: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(seed + 45, s->mykex + 1, 32);
data/tinc-1.1~pre17/src/sptps.c:240: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(seed + 77, s->label, s->labellen);
data/tinc-1.1~pre17/src/sptps.c:300: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(s->hiskex, data, len);
data/tinc-1.1~pre17/src/sptps.c:320: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 msg[(1 + 32 + keylen) * 2 + 1 + s->labellen];
data/tinc-1.1~pre17/src/sptps.c:323: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(msg + 1, s->hiskex, 1 + 32 + keylen);
data/tinc-1.1~pre17/src/sptps.c:324: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(msg + 1 + 33 + keylen, s->mykex, 1 + 32 + keylen);
data/tinc-1.1~pre17/src/sptps.c:325: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(msg + 1 + 2 * (33 + keylen), s->label, s->labellen);
data/tinc-1.1~pre17/src/sptps.c:333: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 shared[ECDH_SHARED_SIZE];
data/tinc-1.1~pre17/src/sptps.c:518: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(&seqno, data, 4);
data/tinc-1.1~pre17/src/sptps.c:525: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[len];
data/tinc-1.1~pre17/src/sptps.c:537: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(&seqno, data, 4);
data/tinc-1.1~pre17/src/sptps.c:561: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[len];
data/tinc-1.1~pre17/src/sptps.c:621: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(s->inbuf + s->buflen, data, toread);
data/tinc-1.1~pre17/src/sptps.c:635: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(&s->reclen, s->inbuf, 2);
data/tinc-1.1~pre17/src/sptps.c:658: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(s->inbuf + s->buflen, data, toread);
data/tinc-1.1~pre17/src/sptps.c:742: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(s->label, label, labellen);
data/tinc-1.1~pre17/src/sptps_keypair.c:95:13:  [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 *fp = fopen(argv[1], "w");
data/tinc-1.1~pre17/src/sptps_keypair.c:109:7:  [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 = fopen(argv[2], "w");
data/tinc-1.1~pre17/src/sptps_speed.c:54: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[4096], *bufp = buf;
data/tinc-1.1~pre17/src/sptps_speed.c:97: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 buf1[4096], buf2[4096], buf3[4096];
data/tinc-1.1~pre17/src/sptps_test.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 hex[len * 2 + 1];
data/tinc-1.1~pre17/src/sptps_test.c:172:17:  [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).
			packetloss = atoi(optarg);
data/tinc-1.1~pre17/src/sptps_test.c:176:22:  [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).
			sptps_replaywin = atoi(optarg);
data/tinc-1.1~pre17/src/sptps_test.c:226:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		in = out = open("/dev/net/tun", O_RDWR | O_NONBLOCK);
data/tinc-1.1~pre17/src/sptps_test.c:310: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[65536];
data/tinc-1.1~pre17/src/sptps_test.c:330:13:  [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 *fp = fopen(argv[1], "r");
data/tinc-1.1~pre17/src/sptps_test.c:343:7:  [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 = fopen(argv[2], "r");
data/tinc-1.1~pre17/src/sptps_test.c:371: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[65535] = "";
data/tinc-1.1~pre17/src/sptps_test.c:406:18:  [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).
				s.outseqno = atoi(buf + 1);
data/tinc-1.1~pre17/src/sptps_test.c:436: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[len * 2 + 1];
data/tinc-1.1~pre17/src/subnet.c:222: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 netstr[MAXNETSTR];
data/tinc-1.1~pre17/src/subnet.c:290: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 netstr[MAXNETSTR];
data/tinc-1.1~pre17/src/subnet_parse.c:207: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 str[1024];
data/tinc-1.1~pre17/src/subnet_parse.c:335: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(&double_colon[i * 2], "0:", 2);
data/tinc-1.1~pre17/src/tincctl.c:58: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.
static char controlcookie[1025];
data/tinc-1.1~pre17/src/tincctl.c:66:1:  [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 line[4096];
data/tinc-1.1~pre17/src/tincctl.c:241: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(filename, mode);
data/tinc-1.1~pre17/src/tincctl.c:260: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 tmpfile[PATH_MAX] = "";
data/tinc-1.1~pre17/src/tincctl.c:260:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	char tmpfile[PATH_MAX] = "";
data/tinc-1.1~pre17/src/tincctl.c:261: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/tinc-1.1~pre17/src/tincctl.c:267:6:  [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).
	r = fopen(filename, "r");
data/tinc-1.1~pre17/src/tincctl.c:273:11:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename);
data/tinc-1.1~pre17/src/tincctl.c:273:27:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	snprintf(tmpfile, sizeof(tmpfile), "%s.tmp", filename);
data/tinc-1.1~pre17/src/tincctl.c:277:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	w = fopenmask(tmpfile, "w", st.st_mode);
data/tinc-1.1~pre17/src/tincctl.c:323:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
				unlink(tmpfile);
data/tinc-1.1~pre17/src/tincctl.c:331: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 bakfile[PATH_MAX] = "";
data/tinc-1.1~pre17/src/tincctl.c:334:42:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if(rename(filename, bakfile) || rename(tmpfile, filename)) {
data/tinc-1.1~pre17/src/tincctl.c:338:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if(rename(tmpfile, filename)) {
data/tinc-1.1~pre17/src/tincctl.c:349:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	unlink(tmpfile);
data/tinc-1.1~pre17/src/tincctl.c:354: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 directory[PATH_MAX] = ".";
data/tinc-1.1~pre17/src/tincctl.c:355: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[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:356: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 buf2[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:425: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:489: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:558:1:  [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/tinc-1.1~pre17/src/tincctl.c:586: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(line, buffer, len);
data/tinc-1.1~pre17/src/tincctl.c:607: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, len);
data/tinc-1.1~pre17/src/tincctl.c:615: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.
	static char buffer[4096];
data/tinc-1.1~pre17/src/tincctl.c:650: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 data[9018];
data/tinc-1.1~pre17/src/tincctl.c:680: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 line[32];
data/tinc-1.1~pre17/src/tincctl.c:707: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 data[1024];
data/tinc-1.1~pre17/src/tincctl.c:708: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 line[32];
data/tinc-1.1~pre17/src/tincctl.c:796: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(pidfilename, "r");
data/tinc-1.1~pre17/src/tincctl.c:806: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 host[129];
data/tinc-1.1~pre17/src/tincctl.c:807: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 port[129];
data/tinc-1.1~pre17/src/tincctl.c:917: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 data[4096];
data/tinc-1.1~pre17/src/tincctl.c:1025: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[100];
data/tinc-1.1~pre17/src/tincctl.c:1043: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/tinc-1.1~pre17/src/tincctl.c:1152: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 dname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:1171: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[MAX_STRING_SIZE];
data/tinc-1.1~pre17/src/tincctl.c:1177: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:1184:13:  [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(fname, "r");
data/tinc-1.1~pre17/src/tincctl.c:1285: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 node1[4096], node2[4096];
data/tinc-1.1~pre17/src/tincctl.c:1304: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 node[4096];
data/tinc-1.1~pre17/src/tincctl.c:1305: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 id[4096];
data/tinc-1.1~pre17/src/tincctl.c:1306: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 from[4096];
data/tinc-1.1~pre17/src/tincctl.c:1307: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 to[4096];
data/tinc-1.1~pre17/src/tincctl.c:1308: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 subnet[4096];
data/tinc-1.1~pre17/src/tincctl.c:1309: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 host[4096];
data/tinc-1.1~pre17/src/tincctl.c:1310: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 port[4096];
data/tinc-1.1~pre17/src/tincctl.c:1311: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 local_host[4096];
data/tinc-1.1~pre17/src/tincctl.c:1312: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 local_port[4096];
data/tinc-1.1~pre17/src/tincctl.c:1313: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 via[4096];
data/tinc-1.1~pre17/src/tincctl.c:1314: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 nexthop[4096];
data/tinc-1.1~pre17/src/tincctl.c:1455:19:  [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).
	int debuglevel = atoi(argv[1]);
data/tinc-1.1~pre17/src/tincctl.c:1573:30:  [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).
	pcap(fd, stdout, argc > 1 ? atoi(argv[1]) : 0);
data/tinc-1.1~pre17/src/tincctl.c:1600: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).
	logcontrol(fd, stdout, argc > 1 ? atoi(argv[1]) : -1);
data/tinc-1.1~pre17/src/tincctl.c:1638: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(tinc_conf, "r");
data/tinc-1.1~pre17/src/tincctl.c:1648: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[4096];
data/tinc-1.1~pre17/src/tincctl.c:1687: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[4096];
data/tinc-1.1~pre17/src/tincctl.c:1881:15:  [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.
		variable = (char *)variables[i].name;
data/tinc-1.1~pre17/src/tincctl.c:1943: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:1951: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(filename, "r");
data/tinc-1.1~pre17/src/tincctl.c:1958: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 tmpfile[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:1958:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	char tmpfile[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:1962:23:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if((size_t)snprintf(tmpfile, sizeof(tmpfile), "%s.config.tmp", filename) >= sizeof(tmpfile)) {
data/tinc-1.1~pre17/src/tincctl.c:1962:39:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if((size_t)snprintf(tmpfile, sizeof(tmpfile), "%s.config.tmp", filename) >= sizeof(tmpfile)) {
data/tinc-1.1~pre17/src/tincctl.c:1962:86:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if((size_t)snprintf(tmpfile, sizeof(tmpfile), "%s.config.tmp", filename) >= sizeof(tmpfile)) {
data/tinc-1.1~pre17/src/tincctl.c:1967:8:  [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).
		tf = fopen(tmpfile, "w");
data/tinc-1.1~pre17/src/tincctl.c:1967:14:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		tf = fopen(tmpfile, "w");
data/tinc-1.1~pre17/src/tincctl.c:1970:62:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			fprintf(stderr, "Could not open temporary file %s: %s\n", tmpfile, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:1977: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 buf1[4096];
data/tinc-1.1~pre17/src/tincctl.c:1978: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 buf2[4096];
data/tinc-1.1~pre17/src/tincctl.c:2030:66:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
					fprintf(stderr, "Error writing to temporary file %s: %s\n", tmpfile, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:2048:65:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
				fprintf(stderr, "Error writing to temporary file %s: %s\n", tmpfile, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:2055:66:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
					fprintf(stderr, "Error writing to temporary file %s: %s\n", tmpfile, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:2076:64:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			fprintf(stderr, "Error writing to temporary file %s: %s\n", tmpfile, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:2092:60:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		fprintf(stderr, "Error closing temporary file %s: %s\n", tmpfile, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:2098:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		remove(tmpfile);
data/tinc-1.1~pre17/src/tincctl.c:2113:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	if(rename(tmpfile, filename)) {
data/tinc-1.1~pre17/src/tincctl.c:2114:86:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		fprintf(stderr, "Error renaming temporary file %s to configuration file %s: %s\n", tmpfile, filename, strerror(errno));
data/tinc-1.1~pre17/src/tincctl.c:2136: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[16];
data/tinc-1.1~pre17/src/tincctl.c:2175: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:2177:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			FILE *f = fopen(filename, "a");
data/tinc-1.1~pre17/src/tincctl.c:2207: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[1024];
data/tinc-1.1~pre17/src/tincctl.c:2256: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(tinc_conf, "w");
data/tinc-1.1~pre17/src/tincctl.c:2281: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:2320:28:  [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).
	if(!rsa_keygen(argc > 1 ? atoi(argv[1]) : 2048, true)) {
data/tinc-1.1~pre17/src/tincctl.c:2344:32:  [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 !rsa_keygen(argc > 1 ? atoi(argv[1]) : 2048, true);
data/tinc-1.1~pre17/src/tincctl.c:2413: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 filename[PATH_MAX] = "";
data/tinc-1.1~pre17/src/tincctl.c:2468: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 filename[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:2470:13:  [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 *in = fopen(filename, "r");
data/tinc-1.1~pre17/src/tincctl.c:2478: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[4096];
data/tinc-1.1~pre17/src/tincctl.c:2573: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[4096];
data/tinc-1.1~pre17/src/tincctl.c:2574: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 name[4096];
data/tinc-1.1~pre17/src/tincctl.c:2575: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 filename[PATH_MAX] = "";
data/tinc-1.1~pre17/src/tincctl.c:2603: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).
			out = fopen(filename, "w");
data/tinc-1.1~pre17/src/tincctl.c:2712: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:2777: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:2779:13:  [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 *fp = fopen(fname, "r");
data/tinc-1.1~pre17/src/tincctl.c:2799:8:  [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).
		in = fopen(argv[1], "rb");
data/tinc-1.1~pre17/src/tincctl.c:2830: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 + len, trailer, trailer_len);
data/tinc-1.1~pre17/src/tincctl.c:2833: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 sig[87];
data/tinc-1.1~pre17/src/tincctl.c:2887:8:  [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).
		in = fopen(argv[2], "rb");
data/tinc-1.1~pre17/src/tincctl.c:2920: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 signer[MAX_STRING_SIZE] = "";
data/tinc-1.1~pre17/src/tincctl.c:2921: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 sig[MAX_STRING_SIZE] = "";
data/tinc-1.1~pre17/src/tincctl.c:2945: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 + len, trailer, trailer_len);
data/tinc-1.1~pre17/src/tincctl.c:2950: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 fname[PATH_MAX];
data/tinc-1.1~pre17/src/tincctl.c:2952:13:  [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 *fp = fopen(fname, "r");
data/tinc-1.1~pre17/src/tincctl.c:3128: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 item[4096];
data/tinc-1.1~pre17/src/tincctl.c:3187: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[4096];
data/tinc-1.1~pre17/src/tincctl.h:25: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 line[4096];
data/tinc-1.1~pre17/src/tincctl.h:27: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 buffer[4096];
data/tinc-1.1~pre17/src/tincd.c:180:19:  [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).
				debug_level = atoi(optarg);
data/tinc-1.1~pre17/src/tincd.c:405:15:  [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).
		umbilical = atoi(umbstr);
data/tinc-1.1~pre17/src/tincd.c:426:29:  [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).
	if(getenv("LISTEN_PID") && atoi(getenv("LISTEN_PID")) == getpid()) {
data/tinc-1.1~pre17/src/top.c:81: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 line[4096];
data/tinc-1.1~pre17/src/top.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 name[4096];
data/tinc-1.1~pre17/src/uml_device.c:109: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_sun.sun_path, &name, sizeof(name));
data/tinc-1.1~pre17/src/upnp.c:94: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 lease_duration[16];
data/tinc-1.1~pre17/src/upnp.c:124: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 myaddr[64];
data/tinc-1.1~pre17/src/utils.c:29: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 base64_decode[256] = {
data/tinc-1.1~pre17/src/utils.c:182: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.
	static char buf[1024], *ptr;
data/tinc-1.1~pre17/src/utils.c:206: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(&value, bitfield, size);
data/tinc-1.1~pre17/src/utils.c:255: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 hostname[HOST_NAME_MAX + 1];
data/tinc-1.1~pre17/src/xalloc.h:69: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/tinc-1.1~pre17/test/splice.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 buf[1024];
data/tinc-1.1~pre17/src/bsd/device.c:362:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			inlen = read(device_fd, DATA(packet) + 14, MTU - 14);
data/tinc-1.1~pre17/src/bsd/device.c:394:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if((inlen = read(device_fd, DATA(packet) + 10, MTU - 10)) <= 0) {
data/tinc-1.1~pre17/src/bsd/device.c:424:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if((inlen = read(device_fd, DATA(packet), MTU)) <= 0) {
data/tinc-1.1~pre17/src/bsd/tunemu.c:260:5:  [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(device) < 4) {
data/tinc-1.1~pre17/src/bsd/tunemu.c:326:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	length = read(ppp_sockfd, data_buffer, length + 2);
data/tinc-1.1~pre17/src/conf.c:264: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).
	eol = line + strlen(line);
data/tinc-1.1~pre17/src/conf.c:368: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 prefix_len = prefix ? strlen(prefix) : 0;
data/tinc-1.1~pre17/src/conf.c:423: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 l = strlen(ep->d_name);
data/tinc-1.1~pre17/src/control.c:149:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t mask = umask(0);
data/tinc-1.1~pre17/src/control.c:150:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask | 077);
data/tinc-1.1~pre17/src/control.c:152:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);
data/tinc-1.1~pre17/src/control.c:202:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(sa_un.sun_path, unixsocketname, sizeof(sa_un.sun_path));
data/tinc-1.1~pre17/src/control.c:213:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask | 077);
data/tinc-1.1~pre17/src/control.c:215:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);
data/tinc-1.1~pre17/src/cygwin/device.c:215:2:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	read(device_fd, &gelukt, 1);
data/tinc-1.1~pre17/src/cygwin/device.c:245:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if((inlen = read(sp[0], DATA(packet), MTU)) <= 0) {
data/tinc-1.1~pre17/src/device.h:33:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bool (*read)(struct vpn_packet_t *);
data/tinc-1.1~pre17/src/ed25519/ecdsa.c:38: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(p);
data/tinc-1.1~pre17/src/ed25519/ecdsa.c:69: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 typelen = strlen(type);
data/tinc-1.1~pre17/src/ed25519/ge.c:333:22:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
static unsigned char equal(signed char b, signed char c) {
data/tinc-1.1~pre17/src/ed25519/ge.c:363:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][0], equal(babs, 1));
data/tinc-1.1~pre17/src/ed25519/ge.c:364:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][1], equal(babs, 2));
data/tinc-1.1~pre17/src/ed25519/ge.c:365:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][2], equal(babs, 3));
data/tinc-1.1~pre17/src/ed25519/ge.c:366:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][3], equal(babs, 4));
data/tinc-1.1~pre17/src/ed25519/ge.c:367:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][4], equal(babs, 5));
data/tinc-1.1~pre17/src/ed25519/ge.c:368:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][5], equal(babs, 6));
data/tinc-1.1~pre17/src/ed25519/ge.c:369:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][6], equal(babs, 7));
data/tinc-1.1~pre17/src/ed25519/ge.c:370:25:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	cmov(t, &base[pos][7], equal(babs, 8));
data/tinc-1.1~pre17/src/event.c:244:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if(read(pipefd[0], &signum, 1) != 1) {
data/tinc-1.1~pre17/src/fd_device.c:87:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int lenin = read(device_fd, DATA(packet) + ETH_HLEN, MTU - ETH_HLEN);
data/tinc-1.1~pre17/src/fsck.c:80: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 slen = strlen(str);
data/tinc-1.1~pre17/src/fsck.c:81: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 tlen = strlen(tail);
data/tinc-1.1~pre17/src/fsck.c:127: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).
		eol = line + strlen(line);
data/tinc-1.1~pre17/src/fsck.c:498:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(fname, ent->d_name, sizeof(fname));
data/tinc-1.1~pre17/src/fsck.c:553:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(fname, ent->d_name, sizeof(fname));
data/tinc-1.1~pre17/src/gcrypt/rsa.c:69:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if(!strncmp(line + 11, header, strlen(header))) {
data/tinc-1.1~pre17/src/getopt.c:231: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).
extern int strlen(const char *);
data/tinc-1.1~pre17/src/getopt.c:420:41:  [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 = nonoption_flags_max_len = strlen(orig_str);
data/tinc-1.1~pre17/src/getopt.c:655:39:  [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).
				                == (unsigned int) strlen(p->name)) {
data/tinc-1.1~pre17/src/getopt.c:677: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).
			nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:706:18:  [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).
					nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:720:18:  [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).
					nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:726: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).
			nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:839:47:  [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((unsigned int)(nameend - nextchar) == strlen(p->name)) {
data/tinc-1.1~pre17/src/getopt.c:861:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:880: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).
						nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:892: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).
						nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/getopt.c:897:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				nextchar += strlen(nextchar);
data/tinc-1.1~pre17/src/info.c:43: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(netstr);
data/tinc-1.1~pre17/src/info.c:104:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if(sscanf(line, "%d %d %4095s", &code, &req, node) == 2) {
data/tinc-1.1~pre17/src/info.c:206:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		int n = sscanf(line, "%d %d %4095s %4095s", &code, &req, from, to);
data/tinc-1.1~pre17/src/info.c:229:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		int n = sscanf(line, "%d %d %4095s %4095s", &code, &req, subnet, from);
data/tinc-1.1~pre17/src/info.c:271:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		int n = sscanf(line, "%d %d %4095s %4095s", &code, &req, netstr, owner);
data/tinc-1.1~pre17/src/invitation.c:316:7:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			if(sscanf(line, "%d %d %4095s", &code, &req, node) != 3) {
data/tinc-1.1~pre17/src/invitation.c:352: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(ent->d_name) != 24) {
data/tinc-1.1~pre17/src/invitation.c:444:22:  [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).
	sha512(fingerprint, strlen(fingerprint), hash);
data/tinc-1.1~pre17/src/invitation.c:452: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).
	char buf[18 + strlen(fingerprint)];
data/tinc-1.1~pre17/src/invitation.c:558:45:  [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 = end ? (size_t)(end - *data) : strlen(*data);
data/tinc-1.1~pre17/src/invitation.c:608: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).
	int varlen = strlen(var);
data/tinc-1.1~pre17/src/invitation.c:656: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(temp_name);
data/tinc-1.1~pre17/src/invitation.c:928:39:  [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).
	sptps_send_record(&sptps, 1, b64key, strlen(b64key));
data/tinc-1.1~pre17/src/invitation.c:966:8:  [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).
		line[strlen(line) - 1] = 0;
data/tinc-1.1~pre17/src/invitation.c:1007:25:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					response = tolower(getchar());
data/tinc-1.1~pre17/src/invitation.c:1172:5:  [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(slash) != 48) {
data/tinc-1.1~pre17/src/invitation.c:1273:44:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if(!recvline(sock, line, sizeof(line)) || sscanf(line, "%d %4095s %d.%d", &code, hisname, &hismajor, &hisminor) < 3 || code != 0 || hismajor != PROT_MAJOR || !check_id(hisname) || !recvline(sock, line, sizeof(line)) || !rstrip(line) || sscanf(line, "%d ", &code) != 1 || code != ACK || strlen(line) < 3) {
data/tinc-1.1~pre17/src/invitation.c:1273:288:  [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(!recvline(sock, line, sizeof(line)) || sscanf(line, "%d %4095s %d.%d", &code, hisname, &hismajor, &hisminor) < 3 || code != 0 || hismajor != PROT_MAJOR || !check_id(hisname) || !recvline(sock, line, sizeof(line)) || !rstrip(line) || sscanf(line, "%d ", &code) != 1 || code != ACK || strlen(line) < 3) {
data/tinc-1.1~pre17/src/invitation.c:1285:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(sha512(fingerprint, strlen(fingerprint), hishash)) {
data/tinc-1.1~pre17/src/linux/device.c:105: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, iface, IFNAMSIZ);
data/tinc-1.1~pre17/src/linux/device.c:110:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifrname, ifr.ifr_name, IFNAMSIZ);
data/tinc-1.1~pre17/src/linux/device.c:152:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		inlen = read(device_fd, DATA(packet) + 10, MTU - 10);
data/tinc-1.1~pre17/src/linux/device.c:170:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		inlen = read(device_fd, DATA(packet), MTU);
data/tinc-1.1~pre17/src/logger.c:93:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			write(umbilical, message, strlen(message));
data/tinc-1.1~pre17/src/logger.c:113:14:  [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(message);
data/tinc-1.1~pre17/src/names.c:150: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).
		int len = strlen(pidfilename);
data/tinc-1.1~pre17/src/names.c:155:4:  [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(unixsocketname + len - 4, ".socket", 8);
data/tinc-1.1~pre17/src/names.c:157:4:  [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(unixsocketname + len, ".socket", 8);
data/tinc-1.1~pre17/src/net_packet.c:1807:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if(devops.read(&packet)) {
data/tinc-1.1~pre17/src/net_packet.c:1813:3:  [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(errors * 50000);
data/tinc-1.1~pre17/src/net_socket.c:113:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
data/tinc-1.1~pre17/src/net_socket.c:212:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
data/tinc-1.1~pre17/src/node.c:124:18:  [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).
	sha512(n->name, strlen(n->name), buf);
data/tinc-1.1~pre17/src/nolegacy/crypto.c:47:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		size_t len = read(random_fd, out, outlen);
data/tinc-1.1~pre17/src/openssl/crypto.c:53:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		size_t len = read(random_fd, out, outlen);
data/tinc-1.1~pre17/src/openssl/rsa.c:49:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if((size_t)BN_hex2bn(&bn_n, n) != strlen(n) || (size_t)BN_hex2bn(&bn_e, e) != strlen(e)) {
data/tinc-1.1~pre17/src/openssl/rsa.c:49:80:  [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((size_t)BN_hex2bn(&bn_n, n) != strlen(n) || (size_t)BN_hex2bn(&bn_e, e) != strlen(e)) {
data/tinc-1.1~pre17/src/openssl/rsa.c:71:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if((size_t)BN_hex2bn(&bn_n, n) != strlen(n) || (size_t)BN_hex2bn(&bn_e, e) != strlen(e) || (size_t)BN_hex2bn(&bn_d, d) != strlen(d)) {
data/tinc-1.1~pre17/src/openssl/rsa.c:71:80:  [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((size_t)BN_hex2bn(&bn_n, n) != strlen(n) || (size_t)BN_hex2bn(&bn_e, e) != strlen(e) || (size_t)BN_hex2bn(&bn_d, d) != strlen(d)) {
data/tinc-1.1~pre17/src/openssl/rsa.c:71:124:  [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((size_t)BN_hex2bn(&bn_n, n) != strlen(n) || (size_t)BN_hex2bn(&bn_e, e) != strlen(e) || (size_t)BN_hex2bn(&bn_d, d) != strlen(d)) {
data/tinc-1.1~pre17/src/process.c:70:2:  [1] (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 low because the source is a
  constant character.
	strncat(command, "\"", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:70: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).
	strncat(command, "\"", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:74:3:  [1] (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 low because the source is a
  constant character.
		strncat(command, " ", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:74: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).
		strncat(command, " ", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:77:4:  [1] (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 low because the source is a
  constant character.
			strncat(command, "\"", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:77:45:  [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).
			strncat(command, "\"", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:80:3:  [1] (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.
		strncat(command, *argp, sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:80:45:  [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).
		strncat(command, *argp, sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:83:4:  [1] (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 low because the source is a
  constant character.
			strncat(command, "\"", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/process.c:83:45:  [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).
			strncat(command, "\"", sizeof(command) - strlen(command));
data/tinc-1.1~pre17/src/protocol.c:107: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(request);
data/tinc-1.1~pre17/src/protocol_auth.c:72: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).
		char s4req[9 + (proxyuser ? strlen(proxyuser) : 0)];
data/tinc-1.1~pre17/src/protocol_auth.c:79:33:  [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).
			memcpy(s4req + 8, proxyuser, strlen(proxyuser));
data/tinc-1.1~pre17/src/protocol_auth.c:92: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).
			len += 3 + strlen(proxyuser) + strlen(proxypass);
data/tinc-1.1~pre17/src/protocol_auth.c:92:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len += 3 + strlen(proxyuser) + strlen(proxypass);
data/tinc-1.1~pre17/src/protocol_auth.c:103:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			s5req[i++] = strlen(proxyuser);
data/tinc-1.1~pre17/src/protocol_auth.c:104:33:  [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).
			memcpy(s5req + i, proxyuser, strlen(proxyuser));
data/tinc-1.1~pre17/src/protocol_auth.c:105: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).
			i += strlen(proxyuser);
data/tinc-1.1~pre17/src/protocol_auth.c:106:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			s5req[i++] = strlen(proxypass);
data/tinc-1.1~pre17/src/protocol_auth.c:107:33:  [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).
			memcpy(s5req + i, proxypass, strlen(proxypass));
data/tinc-1.1~pre17/src/protocol_auth.c:108: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).
			i += strlen(proxypass);
data/tinc-1.1~pre17/src/protocol_auth.c:242:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char hashbuf[18 + strlen(fingerprint)];
data/tinc-1.1~pre17/src/protocol_auth.c:291: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).
		buf[strlen(buf) - 1] = 0;
data/tinc-1.1~pre17/src/protocol_auth.c:475: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).
		char label[25 + strlen(myself->name) + strlen(c->name)];
data/tinc-1.1~pre17/src/protocol_auth.c:475:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char label[25 + strlen(myself->name) + strlen(c->name)];
data/tinc-1.1~pre17/src/protocol_auth.c:703:5:  [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(buffer) != (size_t)len * 2) {
data/tinc-1.1~pre17/src/protocol_key.c:121: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).
		char label[25 + strlen(myself->name) + strlen(to->name)];
data/tinc-1.1~pre17/src/protocol_key.c:121:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char label[25 + strlen(myself->name) + strlen(to->name)];
data/tinc-1.1~pre17/src/protocol_key.c:152:94:  [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(sscanf(request, "%*d %*s %*s %*d " MAX_STRING, buf) != 1 || !(len = b64decode(buf, buf, strlen(buf)))) {
data/tinc-1.1~pre17/src/protocol_key.c:237:94:  [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(sscanf(request, "%*d %*s %*s %*d " MAX_STRING, buf) != 1 || !(len = b64decode(buf, buf, strlen(buf)))) {
data/tinc-1.1~pre17/src/protocol_key.c:242: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).
		char label[25 + strlen(from->name) + strlen(myself->name)];
data/tinc-1.1~pre17/src/protocol_key.c:242:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		char label[25 + strlen(from->name) + strlen(myself->name)];
data/tinc-1.1~pre17/src/protocol_key.c:473: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).
		char buf[strlen(key)];
data/tinc-1.1~pre17/src/protocol_key.c:474:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t len = b64decode(key, buf, strlen(key));
data/tinc-1.1~pre17/src/raw_socket_device.c:62:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_ifrn.ifrn_name, iface, IFNAMSIZ);
data/tinc-1.1~pre17/src/raw_socket_device.c:101:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if((inlen = read(device_fd, DATA(packet), MTU)) <= 0) {
data/tinc-1.1~pre17/src/script.c:46:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(var, p, len);
data/tinc-1.1~pre17/src/script.c:146:20:  [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 pathlen = strlen(pathext);
data/tinc-1.1~pre17/src/script.c:147:22:  [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 scriptlen = strlen(scriptname);
data/tinc-1.1~pre17/src/script.c:150:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(fullname, scriptname, sizeof(fullname));
data/tinc-1.1~pre17/src/script.c:163:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(ext, p, pathlen + 1);
data/tinc-1.1~pre17/src/solaris/device.c:164:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.lifr_name, iface, sizeof(ifr.lifr_name));
data/tinc-1.1~pre17/src/solaris/device.c:192:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.lifr_name, iface, sizeof(ifr.lifr_name));
data/tinc-1.1~pre17/src/solaris/device.c:268:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.lifr_name, iface, sizeof(ifr.lifr_name));
data/tinc-1.1~pre17/src/solaris/device.c:301:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.lifr_name, iface, sizeof(ifr.lifr_name));
data/tinc-1.1~pre17/src/sptps_test.c:389:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t len = read(in, buf, sizeof(buf));
data/tinc-1.1~pre17/src/subnet_parse.c:208:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(str, subnetstr, sizeof(str));
data/tinc-1.1~pre17/src/subnet_parse.c:331: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).
		memmove(double_colon + (zero_group_count * 2 - 1), double_colon, strlen(double_colon) + 1);
data/tinc-1.1~pre17/src/subnet_parse.c:340:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			memmove(&str[0], &str[1], strlen(&str[1]) + 1);
data/tinc-1.1~pre17/src/subnet_parse.c:343:10:  [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(str[strlen(str) - 1] == ':') {
data/tinc-1.1~pre17/src/subnet_parse.c:344:8:  [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).
			str[strlen(str) - 1] = 0;
data/tinc-1.1~pre17/src/tincctl.c:238:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t mask = umask(0);
data/tinc-1.1~pre17/src/tincctl.c:240:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(~perms);
data/tinc-1.1~pre17/src/tincctl.c:255:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(mask);
data/tinc-1.1~pre17/src/tincctl.c:370: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 len = strlen(buf);
data/tinc-1.1~pre17/src/tincctl.c:809:5:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if(fscanf(f, "%20d %1024s %128s port %128s", &pid, controlcookie, host, port) != 4) {
data/tinc-1.1~pre17/src/tincctl.c:834: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, unixsocketname, sizeof(sa.sun_path));
data/tinc-1.1~pre17/src/tincctl.c:920:42:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	if(!recvline(fd, line, sizeof(line)) || sscanf(line, "%d %4095s %d", &code, data, &version) != 3 || code != 0) {
data/tinc-1.1~pre17/src/tincctl.c:1046:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while((len = read(pfd[0], buf, sizeof(buf))) > 0) {
data/tinc-1.1~pre17/src/tincctl.c:1201: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).
		char *eol = buf + strlen(buf);
data/tinc-1.1~pre17/src/tincctl.c:1286:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		int n = sscanf(line, "%d %d %4095s %4095s", &code, &req, node1, node2);
data/tinc-1.1~pre17/src/tincctl.c:1368:12:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			int n = sscanf(line, "%*d %*d %4095s %4095s %4095s port %4095s %4095s port %4095s %x %d", from, to, host, port, local_host, local_port, &options, &weight);
data/tinc-1.1~pre17/src/tincctl.c:1390:12:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			int n = sscanf(line, "%*d %*d %4095s %4095s", subnet, node);
data/tinc-1.1~pre17/src/tincctl.c:1402:12:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
			int n = sscanf(line, "%*d %*d %4095s %4095s port %4095s %x %d %x", node, host, port, &options, &socket, &status_int);
data/tinc-1.1~pre17/src/tincctl.c:1628: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(value);
data/tinc-1.1~pre17/src/tincctl.c:1825:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(line, argv[1], sizeof(line) - 1);
data/tinc-1.1~pre17/src/tincctl.c:1828:3:  [1] (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 low because the source is a
  constant character.
		strncat(line, " ", sizeof(line) - 1 - strlen(line));
data/tinc-1.1~pre17/src/tincctl.c:1828:41:  [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).
		strncat(line, " ", sizeof(line) - 1 - strlen(line));
data/tinc-1.1~pre17/src/tincctl.c:1829:3:  [1] (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.
		strncat(line, argv[i], sizeof(line) - 1 - strlen(line));
data/tinc-1.1~pre17/src/tincctl.c:1829:45:  [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).
		strncat(line, argv[i], sizeof(line) - 1 - strlen(line));
data/tinc-1.1~pre17/src/tincctl.c:1985:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buf2, buf1, sizeof(buf2));
data/tinc-1.1~pre17/src/tincctl.c:2053: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).
			if(*buf1 && buf1[strlen(buf1) - 1] != '\n') {
data/tinc-1.1~pre17/src/tincctl.c:2580:6:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		if(sscanf(buf, "Name = %4095s", name) == 1) {
data/tinc-1.1~pre17/src/tincctl.c:2744:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(!read) {
data/tinc-1.1~pre17/src/tincctl.c:2748:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		count += read;
data/tinc-1.1~pre17/src/tincctl.c:2827:20:  [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 trailer_len = strlen(trailer);
data/tinc-1.1~pre17/src/tincctl.c:2924: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(sscanf(data, "Signature = %s %ld %s", signer, &t, sig) != 3 || strlen(sig) != 86 || !t || !check_id(signer)) {
data/tinc-1.1~pre17/src/tincctl.c:2942:20:  [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 trailer_len = strlen(trailer);
data/tinc-1.1~pre17/src/tincctl.c:3051:69:  [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(!commands[i].hidden && !strncasecmp(commands[i].command, text, strlen(text))) {
data/tinc-1.1~pre17/src/tincctl.c:3072:37:  [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(!strncasecmp(matches[i], text, strlen(text))) {
data/tinc-1.1~pre17/src/tincctl.c:3095:82:  [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((variables[i].type & VAR_HOST) && !strncasecmp(variables[i].name, dot + 1, strlen(dot + 1))) {
data/tinc-1.1~pre17/src/tincctl.c:3101:45:  [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(!strncasecmp(variables[i].name, text, strlen(text))) {
data/tinc-1.1~pre17/src/tincctl.c:3129:11:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		int n = sscanf(line, "%d %d %4095s", &code, &req, item);
data/tinc-1.1~pre17/src/tincctl.c:3146:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if(!strncmp(item, text, strlen(text))) {
data/tinc-1.1~pre17/src/uml_device.c:135:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(listen_sun.sun_path, device, sizeof(listen_sun.sun_path));
data/tinc-1.1~pre17/src/uml_device.c:226:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if((inlen = read(request_fd, &request, sizeof(request))) != sizeof(request)) {
data/tinc-1.1~pre17/src/uml_device.c:256:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if((inlen = read(data_fd, DATA(packet), MTU)) <= 0) {
data/tinc-1.1~pre17/src/utils.c:188: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(buf, "(unable to format errormessage)", sizeof(buf));

ANALYSIS SUMMARY:

Hits = 799
Lines analyzed = 39770 in approximately 1.14 seconds (34741 lines/second)
Physical Source Lines of Code (SLOC) = 27628
Hits@level = [0] 712 [1] 176 [2] 518 [3]  32 [4]  66 [5]   7
Hits@level+ = [0+] 1511 [1+] 799 [2+] 623 [3+] 105 [4+]  73 [5+]   7
Hits/KSLOC@level+ = [0+] 54.6909 [1+] 28.9199 [2+] 22.5496 [3+] 3.80049 [4+] 2.64225 [5+] 0.253366
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.