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/vpnc-0.5.3r550/tunip.h
Examining data/vpnc-0.5.3r550/isakmp-pkt.h
Examining data/vpnc-0.5.3r550/test-crypto.c
Examining data/vpnc-0.5.3r550/isakmp-pkt.c
Examining data/vpnc-0.5.3r550/cisco-decrypt.c
Examining data/vpnc-0.5.3r550/crypto.c
Examining data/vpnc-0.5.3r550/dh.c
Examining data/vpnc-0.5.3r550/crypto.h
Examining data/vpnc-0.5.3r550/math_group.h
Examining data/vpnc-0.5.3r550/vpnc.h
Examining data/vpnc-0.5.3r550/math_group.c
Examining data/vpnc-0.5.3r550/sysdep.c
Examining data/vpnc-0.5.3r550/crypto-openssl.h
Examining data/vpnc-0.5.3r550/crypto-openssl.c
Examining data/vpnc-0.5.3r550/decrypt-utils.c
Examining data/vpnc-0.5.3r550/supp.c
Examining data/vpnc-0.5.3r550/supp.h
Examining data/vpnc-0.5.3r550/crypto-gnutls.c
Examining data/vpnc-0.5.3r550/isakmp.h
Examining data/vpnc-0.5.3r550/dh.h
Examining data/vpnc-0.5.3r550/tap-win32.h
Examining data/vpnc-0.5.3r550/sysdep.h
Examining data/vpnc-0.5.3r550/decrypt-utils.h
Examining data/vpnc-0.5.3r550/config.h
Examining data/vpnc-0.5.3r550/crypto-gnutls.h
Examining data/vpnc-0.5.3r550/config.c
Examining data/vpnc-0.5.3r550/vpnc.c
Examining data/vpnc-0.5.3r550/tunip.c

FINAL RESULTS:

data/vpnc-0.5.3r550/config.c:59: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/vpnc-0.5.3r550/config.c:192:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl(program, program, prompt, NULL);
data/vpnc-0.5.3r550/crypto.c:62:6:  [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.
	if (vsnprintf((*error)->msg, MSG_SIZE, fmt, args) == -1)
data/vpnc-0.5.3r550/sysdep.c:151:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(ifr.ifr_name, dev);
data/vpnc-0.5.3r550/sysdep.c:225:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
				strcpy(value, guid);
data/vpnc-0.5.3r550/sysdep.c:231:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
				strcpy(value, ifname);
data/vpnc-0.5.3r550/sysdep.c:454:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(dev, ifr.ifr_name);
data/vpnc-0.5.3r550/sysdep.c:494:2:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	strcpy(ifr.ifr_name, dev);
data/vpnc-0.5.3r550/sysdep.c:706: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.
	ret = vsnprintf(NULL, 0, fmt, ap);
data/vpnc-0.5.3r550/sysdep.c:712: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(strbuf, ret + 1, fmt, ap);
data/vpnc-0.5.3r550/sysdep.c:786:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(newenv, name);
data/vpnc-0.5.3r550/sysdep.c:788:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(newenv, value);
data/vpnc-0.5.3r550/tunip.c:1068:12:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
		logmsg = syslog;
data/vpnc-0.5.3r550/vpnc.c:198:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(strbuf, oldval);
data/vpnc-0.5.3r550/vpnc.c:200:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(strbuf, value);
data/vpnc-0.5.3r550/vpnc.c:339:2:  [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.
	system(config[CONFIG_SCRIPT]);
data/vpnc-0.5.3r550/vpnc.c:392:2:  [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.
	system(config[CONFIG_SCRIPT]);
data/vpnc-0.5.3r550/vpnc.c:400:2:  [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.
	system(config[CONFIG_SCRIPT]);
data/vpnc-0.5.3r550/vpnc.c:1132:70:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
static struct isakmp_attribute *make_transform_ike(int dh_group, int crypt, int hash, int keylen, int auth)
data/vpnc-0.5.3r550/vpnc.c:1145:46:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	a = new_isakmp_attribute_16(IKE_ATTRIB_ENC, crypt, a);
data/vpnc-0.5.3r550/vpnc.c:1157:21:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	unsigned int auth, crypt, hash, keylen;
data/vpnc-0.5.3r550/vpnc.c:1180:30:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
		for (crypt = 0; supp_crypt[crypt].name != NULL; crypt++) {
data/vpnc-0.5.3r550/vpnc.c:1181:24:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
			keylen = supp_crypt[crypt].keylen;
data/vpnc-0.5.3r550/vpnc.c:1186:47:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
				a = make_transform_ike(dh_grp, supp_crypt[crypt].ike_sa_id,
data/vpnc-0.5.3r550/vpnc.c:2566:15:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	unsigned int crypt, hash, keylen;
data/vpnc-0.5.3r550/vpnc.c:2572:29:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
	for (crypt = 0; supp_crypt[crypt].name != NULL; crypt++) {
data/vpnc-0.5.3r550/vpnc.c:2573:23:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
		keylen = supp_crypt[crypt].keylen;
data/vpnc-0.5.3r550/vpnc.c:2583:43:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
			p->u.p.transforms->u.t.id = supp_crypt[crypt].ipsec_sa_id;
data/vpnc-0.5.3r550/sysdep.c:778: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.
		if (getenv(name) != NULL)
data/vpnc-0.5.3r550/vpnc.c:195:11:  [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.
	oldval = getenv(name);
data/vpnc-0.5.3r550/vpnc.c:2534:38:  [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.
	DEBUG(1, printf("got address %s\n", getenv("INTERNAL_IP4_ADDRESS")));
data/vpnc-0.5.3r550/config.c:43:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *config[LAST_CONFIG];
data/vpnc-0.5.3r550/config.c:678: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(realname, "r");
data/vpnc-0.5.3r550/config.c:682: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).
			f = fopen(realname, "r");
data/vpnc-0.5.3r550/config.c:907:40:  [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).
		opt_debug = (config[CONFIG_DEBUG]) ? atoi(config[CONFIG_DEBUG]) : 0;
data/vpnc-0.5.3r550/config.c:922: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).
		opt_udpencapport=atoi(config[CONFIG_UDP_ENCAP_PORT]);
data/vpnc-0.5.3r550/config.h:97: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.
extern const char *config[LAST_CONFIG];
data/vpnc-0.5.3r550/config.h: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 st[20];				\
data/vpnc-0.5.3r550/crypto-gnutls.c:395: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(rec_hash, from + i, hash_len);
data/vpnc-0.5.3r550/crypto-openssl.c:80: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(path, "r");
data/vpnc-0.5.3r550/crypto.c:104:7:  [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(path, O_RDONLY);
data/vpnc-0.5.3r550/decrypt-utils.c:83: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 ht[20], h2[20], h3[20], key[24];
data/vpnc-0.5.3r550/decrypt-utils.c:93: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(ht, h1, 20);
data/vpnc-0.5.3r550/decrypt-utils.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(key, h2, 20);
data/vpnc-0.5.3r550/decrypt-utils.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(key+20, h3, 4);
data/vpnc-0.5.3r550/isakmp-pkt.c:79: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(flow_reserve_p(f, data_len), data, data_len);
data/vpnc-0.5.3r550/isakmp-pkt.c:343: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->u.ke.data, data, data_length);
data/vpnc-0.5.3r550/isakmp-pkt.c:480: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 ((d), data, (n)), data += (n), data_len -= (n))
data/vpnc-0.5.3r550/math_group.c:176:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(new, clone, sizeof(struct group));
data/vpnc-0.5.3r550/math_group.c:247:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d, tmp + (l2 - l), l);
data/vpnc-0.5.3r550/sysdep.c:109: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).
		ppa = atoi(ptr);
data/vpnc-0.5.3r550/sysdep.c:112: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).
	if ((ip_fd = open("/dev/ip", O_RDWR, 0)) < 0) {
data/vpnc-0.5.3r550/sysdep.c:117: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 ((tun_fd = open(((mode == IF_MODE_TUN) ? "/dev/tun" : "/dev/tap"), O_RDWR, 0)) < 0) {
data/vpnc-0.5.3r550/sysdep.c:128: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).
	if ((if_fd = open(((mode == IF_MODE_TUN) ? "/dev/tun" : "/dev/tap"), O_RDWR, 0)) < 0) {
data/vpnc-0.5.3r550/sysdep.c:173: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 guid[256];
data/vpnc-0.5.3r550/sysdep.c:174: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 ifname[256];
data/vpnc-0.5.3r550/sysdep.c:175: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 conn_string[512];
data/vpnc-0.5.3r550/sysdep.c:256: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 device_path[512];
data/vpnc-0.5.3r550/sysdep.c:331: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 guid[256];
data/vpnc-0.5.3r550/sysdep.c:332: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 comp_id[256];
data/vpnc-0.5.3r550/sysdep.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 enum_name[256];
data/vpnc-0.5.3r550/sysdep.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 unit_string[512];
data/vpnc-0.5.3r550/sysdep.c:439: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).
	if ((fd = open("/dev/net/tun", O_RDWR)) < 0) {
data/vpnc-0.5.3r550/sysdep.c:460: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 tunname[14];
data/vpnc-0.5.3r550/sysdep.c:468:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		return open(tunname, O_RDWR);
data/vpnc-0.5.3r550/sysdep.c:475:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = open(tunname, O_RDWR)) > 0) {
data/vpnc-0.5.3r550/sysdep.c:609: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(tun.data, buf, len);
data/vpnc-0.5.3r550/sysdep.c:634: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, tun.data, pack);
data/vpnc-0.5.3r550/sysdep.c:684: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(hwaddr, &ifr.ifr_hwaddr.sa_data, ETH_ALEN);
data/vpnc-0.5.3r550/sysdep.h:165: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 ether_dhost[ETH_ALEN]; /* destination eth addr */
data/vpnc-0.5.3r550/sysdep.h:166: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 ether_shost[ETH_ALEN]; /* source ether addr    */
data/vpnc-0.5.3r550/sysdep.h:185: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 arp_sha[ETH_ALEN]; /* sender hardware address */
data/vpnc-0.5.3r550/sysdep.h:186: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 arp_spa[4];        /* sender protocol address */
data/vpnc-0.5.3r550/sysdep.h:187: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 arp_tha[ETH_ALEN]; /* target hardware address */
data/vpnc-0.5.3r550/sysdep.h:188: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 arp_tpa[4];        /* target protocol address */
data/vpnc-0.5.3r550/test-crypto.c:38:7:  [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(filename, O_RDONLY);
data/vpnc-0.5.3r550/tunip.c:99:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define FD_COPY(f, t)	((void)memcpy((t), (f), sizeof(*(f))))
data/vpnc-0.5.3r550/tunip.c:263: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(eth_hdr->ether_dhost, s->tun_hwaddr, ETH_ALEN);
data/vpnc-0.5.3r550/tunip.c:264: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(eth_hdr->ether_shost, s->tun_hwaddr, ETH_ALEN);
data/vpnc-0.5.3r550/tunip.c:306: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(digest, hmac_digest, hmac_len);
data/vpnc-0.5.3r550/tunip.c:433: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->ipsec.tx.buf, &ip, sizeof ip);
data/vpnc-0.5.3r550/tunip.c:625: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(eth->ether_dhost, s->tun_hwaddr, ETH_ALEN);
data/vpnc-0.5.3r550/tunip.c:628: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, arp->arp_spa, 4);
data/vpnc-0.5.3r550/tunip.c:629: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, arp->arp_tpa, 4);
data/vpnc-0.5.3r550/tunip.c:630: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, tmp, 4);
data/vpnc-0.5.3r550/tunip.c:632: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, s->tun_hwaddr, ETH_ALEN);
data/vpnc-0.5.3r550/tunip.c:973: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).
	pf = fopen(pidfile, "w");
data/vpnc-0.5.3r550/tunip.c:1054: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).
			close(0); open("/dev/null", O_RDONLY, 0666);
data/vpnc-0.5.3r550/tunip.c:1055: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).
			close(1); open("/dev/null", O_WRONLY, 0666);
data/vpnc-0.5.3r550/tunip.c:1056: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).
			close(2); open("/dev/null", O_WRONLY, 0666);
data/vpnc-0.5.3r550/tunip.h: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 tun_name[IFNAMSIZ];
data/vpnc-0.5.3r550/vpnc.c:320: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(host, string, p - string + 1);
data/vpnc-0.5.3r550/vpnc.c:327: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).
			int bits = atoi(p + 1);
data/vpnc-0.5.3r550/vpnc.c:329: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((char *)(net + 1), (char *)&mask, 4);
data/vpnc-0.5.3r550/vpnc.c:342: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->tun_name, config[CONFIG_IF_NAME], strlen(config[CONFIG_IF_NAME]));
data/vpnc-0.5.3r550/vpnc.c:366: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).
		mtu = atoi(config[CONFIG_IF_MTU]);
data/vpnc-0.5.3r550/vpnc.c:438: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->ike.resend_hash, resend_check_hash, hash_len);
data/vpnc-0.5.3r550/vpnc.c:549: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(iv, gcry_md_read(md_ctx, 0), s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:551: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(s->ike.current_iv, gcry_md_read(md_ctx, 0), s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:552: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(s->ike.current_iv_msgid, block + ISAKMP_MESSAGE_ID_O, 4);
data/vpnc-0.5.3r550/vpnc.c:568: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(new_iv, block + blocklen - s->ike.ivlen, s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:572: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(s->ike.current_iv, new_iv, s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:577: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(s->ike.current_iv, block + blocklen - s->ike.ivlen, s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:691: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->i_cookie, s->ike.i_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:692: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->r_cookie, s->ike.r_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:731: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->payload->u.hash.data, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:777: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(pl->u.n.spi + ISAKMP_COOKIE_LENGTH * 0, s->ike.i_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:778: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(pl->u.n.spi + ISAKMP_COOKIE_LENGTH * 1, s->ike.r_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:840:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(d_ipsec->u.d.spi[0], &s->ipsec.rx.spi, 4);
data/vpnc-0.5.3r550/vpnc.c:842:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(d_ipsec->u.d.spi[1], &s->ipsec.tx.spi, 4);
data/vpnc-0.5.3r550/vpnc.c:863:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(d_isakmp->u.d.spi[0] + ISAKMP_COOKIE_LENGTH * 0, s->ike.i_cookie,
data/vpnc-0.5.3r550/vpnc.c:865:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(d_isakmp->u.d.spi[0] + ISAKMP_COOKIE_LENGTH * 1, s->ike.r_cookie,
data/vpnc-0.5.3r550/vpnc.c:920: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(block + i * s->ike.md_len, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:964: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(&s->our_address, a->u.lots.data, 4);
data/vpnc-0.5.3r550/vpnc.c:1006: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(strbuf, a->u.lots.data, a->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:1017: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(strbuf, a->u.lots.data, a->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:1109: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(strbuf, a->u.lots.data, a->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:1309: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(p1->i_cookie, s->ike.i_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:1328: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(l->u.id.data, key_id, strlen(key_id));
data/vpnc-0.5.3r550/vpnc.c:1348: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).
		s->ike.dpd_idle = atoi(config[CONFIG_DPD_IDLE]);
data/vpnc-0.5.3r550/vpnc.c:1400: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(s->ike.r_cookie, r->r_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:1641: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(s->ike.natd_us, rp->u.natd.data, s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1648: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(s->ike.natd_them, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1711: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(psk_skeyid, gcry_md_read(skeyid_ctx, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1744: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(key, s->ike.i_nonce, sizeof(s->ike.i_nonce));
data/vpnc-0.5.3r550/vpnc.c:1745: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(key + sizeof(s->ike.i_nonce), nonce->u.nonce.data, nonce->u.nonce.length);
data/vpnc-0.5.3r550/vpnc.c:1839: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(s->ike.returned_hash, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1849: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(s->ike.psk_hash, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1865:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			static const unsigned char c012[3] = { 0, 1, 2 };
data/vpnc-0.5.3r550/vpnc.c:1883: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(s->ike.skeyid_d, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1897: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(s->ike.skeyid_a, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1910: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(skeyid_e, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:1931: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(s->ike.key + i * s->ike.md_len, gcry_md_read(hm, 0),
data/vpnc-0.5.3r550/vpnc.c:1936: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(s->ike.key, skeyid_e, s->ike.keylen);
data/vpnc-0.5.3r550/vpnc.c:1955: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(s->ike.current_iv, gcry_md_read(hm, 0), s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:1981: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(s->ike.natd_us, gcry_md_read(hm, 0), s->ike.md_len);
data/vpnc-0.5.3r550/vpnc.c:2042: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(p2->i_cookie, s->ike.i_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:2043: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(p2->r_cookie, s->ike.r_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:2056: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(pl->u.n.spi + ISAKMP_COOKIE_LENGTH * 0, s->ike.i_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:2057: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(pl->u.n.spi + ISAKMP_COOKIE_LENGTH * 1, s->ike.r_cookie, ISAKMP_COOKIE_LENGTH);
data/vpnc-0.5.3r550/vpnc.c:2070: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(pl->u.n.spi + ISAKMP_COOKIE_LENGTH * 0,
data/vpnc-0.5.3r550/vpnc.c:2072: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(pl->u.n.spi + ISAKMP_COOKIE_LENGTH * 1,
data/vpnc-0.5.3r550/vpnc.c:2076: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(pl->u.n.data, s->ike.psk_hash, pl->u.n.data_length);
data/vpnc-0.5.3r550/vpnc.c:2102: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->ike.initial_iv, s->ike.current_iv, s->ike.ivlen);
data/vpnc-0.5.3r550/vpnc.c:2216: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 ntop_buf[32];
data/vpnc-0.5.3r550/vpnc.c:2322: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(na->u.lots.data, config[CONFIG_DOMAIN],
data/vpnc-0.5.3r550/vpnc.c:2330: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(na->u.lots.data, config[CONFIG_XAUTH_USERNAME],
data/vpnc-0.5.3r550/vpnc.c:2359: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(na->u.lots.data, pass, na->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:2366: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(na->u.lots.data, config[CONFIG_XAUTH_PASSWORD],
data/vpnc-0.5.3r550/vpnc.c:2471: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(a->u.lots.data, config[CONFIG_VERSION], a->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:2476: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(a->u.lots.data, uts.nodename, a->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:2487: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(a->u.lots.data, FW_UNKNOWN_TYPEINFO, a->u.lots.length);
data/vpnc-0.5.3r550/vpnc.c:2580: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(p->u.p.spi, &s->ipsec.rx.spi, 4);
data/vpnc-0.5.3r550/vpnc.c:2623: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(us->u.id.data, &s->our_address, sizeof(struct in_addr));
data/vpnc-0.5.3r550/vpnc.c:2704: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(&s->ipsec.tx.spi, rp->u.sa.proposals->u.p.spi, 4);
data/vpnc-0.5.3r550/vpnc.c:2934: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->ipsec.tx.spi, rp->u.sa.proposals->u.p.spi, 4);
data/vpnc-0.5.3r550/vpnc.c:3048: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(nonce_i_copy, nonce_i->u.nonce.data, nonce_i_copy_len);
data/vpnc-0.5.3r550/vpnc.c:3064: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(rp->u.sa.proposals->u.p.spi, &s->ipsec.rx.spi, 4);
data/vpnc-0.5.3r550/vpnc.c:3071: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(rp->u.ke.data, dh_public, dh_getlen(dh_grp));
data/vpnc-0.5.3r550/vpnc.c:3074: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(rp->u.nonce.data, nonce_r, sizeof(nonce_r));
data/vpnc-0.5.3r550/vpnc.c:3240: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).
	s->ike.src_port = atoi(config[CONFIG_LOCAL_PORT]);
data/vpnc-0.5.3r550/config.c:138:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = fgetc(stream);
data/vpnc-0.5.3r550/config.c:221:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bytes = read(fds[0], pass, GETLINE_MAX_BUFLEN - 1);
data/vpnc-0.5.3r550/config.c:704: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).
					strlen(config_names[i].name)) == 0) {
data/vpnc-0.5.3r550/config.c:713: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).
					start = strlen(config_names[i].name);
data/vpnc-0.5.3r550/config.c:850: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).
					strlen(config_names[c].option)) != 0)
data/vpnc-0.5.3r550/config.c:856: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).
			if (argv[i][strlen(config_names[c].option)] == '=')
data/vpnc-0.5.3r550/config.c:857: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).
				s = argv[i] + strlen(config_names[c].option) + 1;
data/vpnc-0.5.3r550/config.c:858: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).
			else if (argv[i][strlen(config_names[c].option)] == 0) {
data/vpnc-0.5.3r550/config.c:1021: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).
				last = strlen(config[config_names[i].nm]) - 1;
data/vpnc-0.5.3r550/crypto.c:128:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		bytes_read = read(fd, &(data[*out_len]), (st.st_size - *out_len));
data/vpnc-0.5.3r550/sysdep.c:448: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, dev, IFNAMSIZ);
data/vpnc-0.5.3r550/sysdep.c:626:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	pack = read(fd, data, sz);
data/vpnc-0.5.3r550/sysdep.c:648:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	return read(fd, buf, len);
data/vpnc-0.5.3r550/sysdep.c:678:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(ifr.ifr_name, dev, IFNAMSIZ);
data/vpnc-0.5.3r550/sysdep.c:758: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).
	len = strlen(name);
data/vpnc-0.5.3r550/sysdep.c:781: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).
	newenv = malloc(strlen(name) + 1 + strlen(value) + 1);
data/vpnc-0.5.3r550/sysdep.c:781: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).
	newenv = malloc(strlen(name) + 1 + strlen(value) + 1);
data/vpnc-0.5.3r550/sysdep.c:787:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(newenv, "=");
data/vpnc-0.5.3r550/test-crypto.c:63:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, b, s.st_size);
data/vpnc-0.5.3r550/vpnc.c:197: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).
		strbuf = xallocc(strlen(oldval) + 1 + strlen(value) + 1);
data/vpnc-0.5.3r550/vpnc.c:197: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).
		strbuf = xallocc(strlen(oldval) + 1 + strlen(value) + 1);
data/vpnc-0.5.3r550/vpnc.c:199:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(strbuf, " ");
data/vpnc-0.5.3r550/vpnc.c:342: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).
		memcpy(s->tun_name, config[CONFIG_IF_NAME], strlen(config[CONFIG_IF_NAME]));
data/vpnc-0.5.3r550/vpnc.c:1326: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).
		l->u.id.length = strlen(key_id);
data/vpnc-0.5.3r550/vpnc.c:1328:32:  [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(l->u.id.data, key_id, strlen(key_id));
data/vpnc-0.5.3r550/vpnc.c:1706: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).
			gcry_md_setkey(skeyid_ctx, shared_key, strlen(shared_key));
data/vpnc-0.5.3r550/vpnc.c:1725:44:  [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).
				gcry_md_setkey(skeyid_ctx, shared_key, strlen(shared_key));
data/vpnc-0.5.3r550/vpnc.c:1846:34:  [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).
			gcry_md_write(hm, shared_key, strlen(shared_key));
data/vpnc-0.5.3r550/vpnc.c:2320:26:  [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).
					na->u.lots.length = strlen(config[CONFIG_DOMAIN]);
data/vpnc-0.5.3r550/vpnc.c:2328:26:  [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).
					na->u.lots.length = strlen(config[CONFIG_XAUTH_USERNAME]);
data/vpnc-0.5.3r550/vpnc.c:2357:26:  [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).
					na->u.lots.length = strlen(pass);
data/vpnc-0.5.3r550/vpnc.c:2364:26:  [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).
					na->u.lots.length = strlen(config[CONFIG_XAUTH_PASSWORD]);
data/vpnc-0.5.3r550/vpnc.c:2469: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).
	a->u.lots.length = strlen(config[CONFIG_VERSION]);
data/vpnc-0.5.3r550/vpnc.c:2474: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).
	a->u.lots.length = strlen(uts.nodename);

ANALYSIS SUMMARY:

Hits = 195
Lines analyzed = 10632 in approximately 0.31 seconds (34756 lines/second)
Physical Source Lines of Code (SLOC) = 8202
Hits@level = [0] 251 [1]  34 [2] 130 [3]   3 [4]  28 [5]   0
Hits@level+ = [0+] 446 [1+] 195 [2+] 161 [3+]  31 [4+]  28 [5+]   0
Hits/KSLOC@level+ = [0+] 54.377 [1+] 23.7747 [2+] 19.6294 [3+] 3.77957 [4+] 3.4138 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.