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/proxychains-ng-4.14/src/allocator_thread.c
Examining data/proxychains-ng-4.14/src/allocator_thread.h
Examining data/proxychains-ng-4.14/src/core.c
Examining data/proxychains-ng-4.14/src/core.h
Examining data/proxychains-ng-4.14/src/debug.c
Examining data/proxychains-ng-4.14/src/debug.h
Examining data/proxychains-ng-4.14/src/hash.c
Examining data/proxychains-ng-4.14/src/hash.h
Examining data/proxychains-ng-4.14/src/hostsreader.c
Examining data/proxychains-ng-4.14/src/ip_type.c
Examining data/proxychains-ng-4.14/src/ip_type.h
Examining data/proxychains-ng-4.14/src/libproxychains.c
Examining data/proxychains-ng-4.14/src/main.c
Examining data/proxychains-ng-4.14/src/mutex.h
Examining data/proxychains-ng-4.14/src/nameinfo.c
Examining data/proxychains-ng-4.14/src/version.c
Examining data/proxychains-ng-4.14/src/common.c
Examining data/proxychains-ng-4.14/src/common.h
Examining data/proxychains-ng-4.14/tests/test_getaddrinfo.c
Examining data/proxychains-ng-4.14/tests/test_gethostent.c
Examining data/proxychains-ng-4.14/tests/test_gethostent_r.c
Examining data/proxychains-ng-4.14/tests/test_getnameinfo.c
Examining data/proxychains-ng-4.14/tests/test_proxy_gethostbyname.c
Examining data/proxychains-ng-4.14/tests/test_sendto.c
Examining data/proxychains-ng-4.14/tests/test_shm.c
Examining data/proxychains-ng-4.14/tests/test_v4_in_v6.c

FINAL RESULTS:

data/proxychains-ng-4.14/src/common.c:53:9:  [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.
	return access(path, R_OK) != -1;
data/proxychains-ng-4.14/src/core.c:114:3:  [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(buff, sizeof(buff), str, arglist);
data/proxychains-ng-4.14/src/libproxychains.c:304:15:  [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.
				int ret = sscanf(buff, "%s %s %d %s %s", type, host, &port_n, pd[count].user, pd[count].pass);
data/proxychains-ng-4.14/src/libproxychains.c:357: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.
					sscanf(buff, "%s %d", user, &tcp_read_time_out);
data/proxychains-ng-4.14/src/libproxychains.c:359: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.
					sscanf(buff, "%s %d", user, &tcp_connect_time_out);
data/proxychains-ng-4.14/src/libproxychains.c:361: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.
					sscanf(buff, "%s %u", user, &remote_dns_subnet);
data/proxychains-ng-4.14/src/libproxychains.c:368:9:  [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(buff, "%s %21[^/]/%15s", user, local_in_addr_port, local_netmask) < 3) {
data/proxychains-ng-4.14/src/main.c:103:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, LOG_PREFIX "config file found: %s\n", path);
data/proxychains-ng-4.14/src/main.c:120: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(buf, R_OK) != -1) {
data/proxychains-ng-4.14/src/main.c:132:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		fprintf(stderr, LOG_PREFIX "preloading %s/%s\n", prefix, dll_name);
data/proxychains-ng-4.14/src/main.c:146: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(buf, sizeof(buf), LD_PRELOAD_ENV "=%s/%s%s%s",
data/proxychains-ng-4.14/src/main.c:152:2:  [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.
	execvp(argv[start_argv], &argv[start_argv]);
data/proxychains-ng-4.14/tests/test_sendto.c:30:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(request, "GET / HTTP/1.0\r\nHost: %s\r\n\r\n", hostname);
data/proxychains-ng-4.14/src/common.c:64:9:  [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.
	path = getenv(PROXYCHAINS_CONF_FILE_ENV_VAR);
data/proxychains-ng-4.14/src/common.c:76:9:  [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.
	path = getenv("HOME");
data/proxychains-ng-4.14/src/libproxychains.c:126: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/proxychains-ng-4.14/src/libproxychains.c:281:24:  [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.
	env = get_config_path(getenv(PROXYCHAINS_CONF_FILE_ENV_VAR), buff, sizeof(buff));
data/proxychains-ng-4.14/src/libproxychains.c:288:8:  [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.
	env = getenv(PROXYCHAINS_QUIET_MODE_ENV_VAR);
data/proxychains-ng-4.14/src/main.c:145:18:  [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 *old_val = getenv(LD_PRELOAD_ENV);
data/proxychains-ng-4.14/src/allocator_thread.c:39:8:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	if(p) memcpy(p, s, len);
data/proxychains-ng-4.14/src/allocator_thread.c:173: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 emsg[1024];
data/proxychains-ng-4.14/src/allocator_thread.c:248: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[MSG_LEN_MAX];
data/proxychains-ng-4.14/src/allocator_thread.c:264: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(readbuf.host, host, l + 1);
data/proxychains-ng-4.14/src/common.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 buf[512];
data/proxychains-ng-4.14/src/core.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 buff[1024*4];
data/proxychains-ng-4.14/src/core.c:193: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 hostnamebuf[MSG_LEN_MAX];
data/proxychains-ng-4.14/src/core.c:219: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 buff[BUFF_SIZE];
data/proxychains-ng-4.14/src/core.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 ip_buf[INET6_ADDRSTRLEN];
data/proxychains-ng-4.14/src/core.c:233: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 src[HTTP_AUTH_MAX];
data/proxychains-ng-4.14/src/core.c:234: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 dst[(4 * HTTP_AUTH_MAX)];
data/proxychains-ng-4.14/src/core.c:280: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(&buff[2], &port, 2);	// dest port
data/proxychains-ng-4.14/src/core.c:287: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(&buff[4], &ip.addr.v4, 4);	// dest host
data/proxychains-ng-4.14/src/core.c:290: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(&buff[8], user, len);
data/proxychains-ng-4.14/src/core.c:297: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(&buff[8 + len], dns_name, dns_len + 1);
data/proxychains-ng-4.14/src/core.c:334: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 in[2];
data/proxychains-ng-4.14/src/core.c:335: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 out[515];
data/proxychains-ng-4.14/src/core.c:341: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(cur, user, c);
data/proxychains-ng-4.14/src/core.c:345: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(cur, pass, c);
data/proxychains-ng-4.14/src/core.c:371: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(buff + buff_iter, ip.addr.v6, v6?16:4);	// dest host
data/proxychains-ng-4.14/src/core.c:376: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(buff + buff_iter, dns_name, dns_len);
data/proxychains-ng-4.14/src/core.c:380: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(buff + buff_iter, &port, 2);	// dest port
data/proxychains-ng-4.14/src/core.c:434: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 ip_buf[INET6_ADDRSTRLEN];
data/proxychains-ng-4.14/src/core.c:450:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	if(v6) memcpy(&addr6.sin6_addr.s6_addr, pd->ip.addr.v6, 16);
data/proxychains-ng-4.14/src/core.c:521: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 hostname_buf[MSG_LEN_MAX];
data/proxychains-ng-4.14/src/core.c:522: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 ip_buf[INET6_ADDRSTRLEN];
data/proxychains-ng-4.14/src/core.c:749: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 buff[256];
data/proxychains-ng-4.14/src/core.c:793:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char addr_name[256];
data/proxychains-ng-4.14/src/core.c:832: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/proxychains-ng-4.14/src/core.c:849: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(&((struct sockaddr_in *) &space->sockaddr_space)->sin_addr,
data/proxychains-ng-4.14/src/core.c:856:33:  [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).
	port = se ? se->s_port : htons(atoi(service ? service : "0"));
data/proxychains-ng-4.14/src/core.h:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char user[256];
data/proxychains-ng-4.14/src/core.h:77: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 pass[256];
data/proxychains-ng-4.14/src/core.h: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 *resolved_addr_p[2];
data/proxychains-ng-4.14/src/core.h:114:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char addr_name[1024 * 8];
data/proxychains-ng-4.14/src/debug.c:9: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 ip_buf[INET6_ADDRSTRLEN];
data/proxychains-ng-4.14/src/hostsreader.c:19: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).
	if(!(ctx->f = fopen("/etc/hosts", "r"))) return 0;
data/proxychains-ng-4.14/src/hostsreader.c:78: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[320];
data/proxychains-ng-4.14/src/hostsreader.c:83: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(res.octet, &c.s_addr, 4);
data/proxychains-ng-4.14/src/hostsreader.c:91: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[256];
data/proxychains-ng-4.14/src/ip_type.h:7: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 octet[4];
data/proxychains-ng-4.14/src/ip_type.h:14:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char v6[16];
data/proxychains-ng-4.14/src/libproxychains.c:223: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(user_buf, u, ul);
data/proxychains-ng-4.14/src/libproxychains.c:225: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(pass_buf, p, pl);
data/proxychains-ng-4.14/src/libproxychains.c:238: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(host_buf, h, hl);
data/proxychains-ng-4.14/src/libproxychains.c:240: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).
	*port_n = atoi(p+1);
data/proxychains-ng-4.14/src/libproxychains.c:243:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(type_buf, "socks4");
data/proxychains-ng-4.14/src/libproxychains.c:246:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(type_buf, "socks5");
data/proxychains-ng-4.14/src/libproxychains.c:249:4:  [2] (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). Risk is low because the source is a constant string.
			strcpy(type_buf, "http");
data/proxychains-ng-4.14/src/libproxychains.c:267: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 buff[1024], type[1024], host[1024], user[1024];
data/proxychains-ng-4.14/src/libproxychains.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 local_in_addr_port[32];
data/proxychains-ng-4.14/src/libproxychains.c:270: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 local_in_addr[32], local_in_port[32], local_netmask[32];
data/proxychains-ng-4.14/src/libproxychains.c:282: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).
	if( ( file = fopen(env, "r") ) == NULL )
data/proxychains-ng-4.14/src/libproxychains.c:400: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).
							    (short) atoi(local_in_port);
data/proxychains-ng-4.14/src/libproxychains.c:416: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).
					len = atoi(++pc);
data/proxychains-ng-4.14/src/libproxychains.c:466:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	DEBUGDECL(char str[256]);
data/proxychains-ng-4.14/src/libproxychains.c:487: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(&v4inv6.s_addr, &p_addr_in6->s6_addr[12], 4);
data/proxychains-ng-4.14/src/libproxychains.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(dest_ip.addr.v6, v6 ? (void*)p_addr_in6 : (void*)p_addr_in, v6?16:4);
data/proxychains-ng-4.14/src/libproxychains.c:586:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			unsigned char v4inv6buf[4];
data/proxychains-ng-4.14/src/libproxychains.c:592: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(v4inv6buf, &((struct sockaddr_in6*)sa)->sin6_addr.s6_addr[12], 4);
data/proxychains-ng-4.14/src/libproxychains.c:618: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[16];
data/proxychains-ng-4.14/src/libproxychains.c:619: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 ipv4[4];
data/proxychains-ng-4.14/src/libproxychains.c:620: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 *list[2];
data/proxychains-ng-4.14/src/libproxychains.c:621: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 *aliases[1];
data/proxychains-ng-4.14/src/libproxychains.c:632: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(ipv4, addr, 4);
data/proxychains-ng-4.14/src/main.c:34: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 own_dir[256];
data/proxychains-ng-4.14/src/main.c:54:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(own_dir, "/dev/null/", 11);
data/proxychains-ng-4.14/src/main.c:56: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(own_dir, ".", 2);
data/proxychains-ng-4.14/src/main.c:59:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(own_dir, argv0, l - 1);
data/proxychains-ng-4.14/src/main.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 buf[256];
data/proxychains-ng-4.14/src/main.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 pbuf[256];
data/proxychains-ng-4.14/tests/test_getaddrinfo.c:27: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[NI_MAXHOST] = "";
data/proxychains-ng-4.14/tests/test_gethostent.c:6: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 ipbuf[16];
data/proxychains-ng-4.14/tests/test_gethostent_r.c:27: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 ipbuf[16];
data/proxychains-ng-4.14/tests/test_gethostent_r.c:42: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 h_buf[1024];
data/proxychains-ng-4.14/tests/test_getnameinfo.c:19:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV];
data/proxychains-ng-4.14/tests/test_getnameinfo.c:21: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.sin_addr   , (char[]) {127,0,0,1}, 4);
data/proxychains-ng-4.14/tests/test_getnameinfo.c:104: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(&b.sin6_addr,"\0\0\0\0\0\0\0\0\0\0\xff\xff\xc0\xa8\1\2", 16);
data/proxychains-ng-4.14/tests/test_getnameinfo.c:116: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(&b.sin6_addr,"\0\0\xaa\0\0\0\0\0\0\0\0\xff\xc0\xa8\1\2", 16);
data/proxychains-ng-4.14/tests/test_proxy_gethostbyname.c:6: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 ipbuf[16];
data/proxychains-ng-4.14/tests/test_sendto.c:27: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).
	const int portno = atoi(argv[2]);
data/proxychains-ng-4.14/tests/test_sendto.c:29:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char request[BUFSIZ];
data/proxychains-ng-4.14/tests/test_sendto.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 buffer[BUFSIZ];
data/proxychains-ng-4.14/tests/test_sendto.c:45: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(&serv_addr.sin_addr.s_addr, server->h_addr, server->h_length);
data/proxychains-ng-4.14/tests/test_shm.c:8: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 buf4096[4096];
data/proxychains-ng-4.14/tests/test_v4_in_v6.c:12: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(&v6->s6_addr[12], &v4->s_addr, 4);
data/proxychains-ng-4.14/src/allocator_thread.c:215:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, out, bytes);
data/proxychains-ng-4.14/src/allocator_thread.c:262: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).
					size_t l = strlen(host);
data/proxychains-ng-4.14/src/core.c:76: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).
	l = strlen(src);
data/proxychains-ng-4.14/src/core.c:144:55:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(ready != 1 || !(pfd[0].revents & POLLIN) || 1 != read(fd, &buff[i], 1))
data/proxychains-ng-4.14/src/core.c:210: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 ulen = strlen(user);
data/proxychains-ng-4.14/src/core.c:211: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 passlen = strlen(pass);
data/proxychains-ng-4.14/src/core.c:626:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
						usleep(10000 * looped);
data/proxychains-ng-4.14/src/core.c:778:57:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	data->resolved_addr = at_get_ip_for_host((char*) name, strlen(name)).as_int;
data/proxychains-ng-4.14/src/libproxychains.c:320:55:  [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).
						ip_type4 internal_ip = at_get_ip_for_host(host, strlen(host));
data/proxychains-ng-4.14/src/libproxychains.c:375:9:  [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(local_in_addr_port, "%15[^:]:%5s", local_in_addr, local_in_port) < 2) {
data/proxychains-ng-4.14/src/libproxychains.c:601: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(host);
data/proxychains-ng-4.14/src/main.c:49: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).
	size_t l = strlen(argv0);
data/proxychains-ng-4.14/tests/test_sendto.c:50: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).
	  n = send(sockfd, request, strlen(request), 0);
data/proxychains-ng-4.14/tests/test_sendto.c:52: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).
	  n = sendto(sockfd, request, strlen(request), MSG_FASTOPEN, (struct sockaddr *)&serv_addr, sizeof(serv_addr));
data/proxychains-ng-4.14/tests/test_sendto.c:60:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(sockfd, buffer, BUFSIZ - 1);

ANALYSIS SUMMARY:

Hits = 120
Lines analyzed = 3041 in approximately 0.12 seconds (26098 lines/second)
Physical Source Lines of Code (SLOC) = 2458
Hits@level = [0]  58 [1]  15 [2]  86 [3]   6 [4]  13 [5]   0
Hits@level+ = [0+] 178 [1+] 120 [2+] 105 [3+]  19 [4+]  13 [5+]   0
Hits/KSLOC@level+ = [0+] 72.4166 [1+] 48.8202 [2+] 42.7177 [3+] 7.72986 [4+] 5.28885 [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.