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/socket-wrapper-1.2.5/src/socket_wrapper.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_socket_options.c
Examining data/socket-wrapper-1.2.5/tests/test_tcp_listen.c
Examining data/socket-wrapper-1.2.5/tests/test_fork_thread_deadlock.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_connect.c
Examining data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_write_read.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_bind.c
Examining data/socket-wrapper-1.2.5/tests/torture.c
Examining data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_sendmsg_recvmsg.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c
Examining data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_connect.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_sendmsg_recvmsg.c
Examining data/socket-wrapper-1.2.5/tests/test_tcp_socket_overwrite.c
Examining data/socket-wrapper-1.2.5/tests/test_swrap_unit.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_udp_send_recv.c
Examining data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c
Examining data/socket-wrapper-1.2.5/tests/echo_srv.c
Examining data/socket-wrapper-1.2.5/tests/thread_deadlock.c
Examining data/socket-wrapper-1.2.5/tests/torture.h
Examining data/socket-wrapper-1.2.5/tests/test_max_sockets.c
Examining data/socket-wrapper-1.2.5/tests/test_thread_sockets.c
Examining data/socket-wrapper-1.2.5/tests/test_fcntl.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c
Examining data/socket-wrapper-1.2.5/tests/test_close_failure.c
Examining data/socket-wrapper-1.2.5/tests/test_thread_echo_udp_send_recv.c
Examining data/socket-wrapper-1.2.5/tests/test_tcp_dup2.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_tcp_get_peer_sock_name.c
Examining data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c
Examining data/socket-wrapper-1.2.5/tests/test_ioctl.c

FINAL RESULTS:

data/socket-wrapper-1.2.5/src/socket_wrapper.c:377: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(buffer, sizeof(buffer), format, va);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1385:8:  [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.
	ret = snprintf(un->sun_path,
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1848:6:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
	if (sscanf(p, SOCKET_FORMAT, &type, &iface, &prt) != 3) {
data/socket-wrapper-1.2.5/tests/test_ioctl.c:53:7:  [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.
	rc = system(remove_cmd);
data/socket-wrapper-1.2.5/tests/torture.c:179:7:  [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.
	rc = system(start_echo_srv);
data/socket-wrapper-1.2.5/tests/torture.c:243:8:  [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.
		rc = system(remove_cmd);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:367:6:  [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.
	d = getenv("SOCKET_WRAPPER_DEBUGLEVEL");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:594:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *env_preload = getenv("LD_PRELOAD");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:595:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *env_deepbind = getenv("SOCKET_WRAPPER_DISABLE_DEEPBIND");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1220:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	net_str = getenv("SOCKET_WRAPPER_IPV4_NETWORK");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1437:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *s = getenv("SOCKET_WRAPPER_DIR");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1446:14:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	swrap_dir = realpath(s, NULL);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1467:6:  [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.
	t = getenv("SOCKET_WRAPPER_DIR_ALLOW_ORIG");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1507:6:  [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.
	s = getenv("SOCKET_WRAPPER_MTU");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1562:6:  [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.
	s = getenv("SOCKET_WRAPPER_MAX_SOCKETS");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1715: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.
	const char *s = getenv("SOCKET_WRAPPER_DEFAULT_IFACE");
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2652:6:  [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.
	s = getenv("SOCKET_WRAPPER_PCAP_FILE");
data/socket-wrapper-1.2.5/tests/echo_srv.c:97:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *ip4 = getenv("TORTURE_SERVER_ADDRESS_IPV4");
data/socket-wrapper-1.2.5/tests/echo_srv.c:107:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *ip6 = getenv("TORTURE_SERVER_ADDRESS_IPV6");
data/socket-wrapper-1.2.5/tests/echo_srv.c:893:19:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opt = getopt_long(argc, argv, "Dutp:b:",
data/socket-wrapper-1.2.5/tests/torture.c:66:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *ip4 = getenv("TORTURE_SERVER_ADDRESS_IPV4");
data/socket-wrapper-1.2.5/tests/torture.c:76:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *ip6 = getenv("TORTURE_SERVER_ADDRESS_IPV6");
data/socket-wrapper-1.2.5/tests/torture.c:94:14:  [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 *env = getenv("TORTURE_SERVER_PORT");
data/socket-wrapper-1.2.5/tests/torture.c:234:14:  [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 *env = getenv("TORTURE_SKIP_CLEANUP");
data/socket-wrapper-1.2.5/tests/torture.c:311: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/socket-wrapper-1.2.5/src/socket_wrapper.c:360:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[1024];
data/socket-wrapper-1.2.5/src/socket_wrapper.c:369: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).
		lvl = atoi(d);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:512:21:  [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).
	SWRAP_SYMBOL_ENTRY(fopen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:524:21:  [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).
	SWRAP_SYMBOL_ENTRY(open);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:622: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 soname[256] = {0};
data/socket-wrapper-1.2.5/src/socket_wrapper.c:646: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 soname[256] = {0};
data/socket-wrapper-1.2.5/src/socket_wrapper.c:908:25:  [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).
	swrap_bind_symbol_libc(fopen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:927:25:  [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).
	swrap_bind_symbol_libc(open);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1156:25:  [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).
	swrap_bind_symbol_libc(fopen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1168:25:  [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).
	swrap_bind_symbol_libc(open);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2125: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(&si->bindname.sa.in, &bind_in, blen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2177: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(&si->bindname.sa.in6, &bind_in, blen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2816: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(i.ip->v6.src_addr, src_in6->sin6_addr.s6_addr, 16);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2817: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(i.ip->v6.dest_addr, dest_in6->sin6_addr.s6_addr, 16);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2868: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(i.ip->v6.src_addr, dest_in6->sin6_addr.s6_addr, 16);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2869: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(i.ip->v6.dest_addr, src_in6->sin6_addr.s6_addr, 16);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:2908:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, payload, payload_len);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3419: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(&si->myname.sa.in, &sin, si->myname.sa_socklen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3429: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(&si->myname.sa.in6, &sin6, si->myname.sa_socklen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3628: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(&child_si->peername.sa.ss, &in_addr.sa.ss, in_addr.sa_socklen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3633: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(addr, &in_addr.sa.ss, copy_len);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3664: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(&child_si->myname.sa.ss, &in_my_addr.sa.ss, in_my_addr.sa_socklen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3758: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(&si->myname.sa.in, &in, si->myname.sa_socklen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3792: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(&si->myname.sa.in6, &in6, si->myname.sa_socklen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3930: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(&si->peername.sa.ss, serv_addr, addrlen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:3945: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(&si->myname.sa.ss,
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4054: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(&si->myname.sa.ss, myaddr, addrlen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4228: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).
FILE *fopen(const char *name, const char *mode)
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4279:5:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
int open(const char *pathname, int flags, ...)
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4388:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(name, &si->peername.sa.ss, len);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4429:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(name, &si->myname.sa.ss, len);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4591: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(optval, &info, ilen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4862: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(CMSG_DATA(cm), data, len);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:4870: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, cm, cmlen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:5018: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, cmsg, cmsg->cmsg_len);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:5233: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(msg->msg_control, cmbuf, cmlen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:5290:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf + ofs,
data/socket-wrapper-1.2.5/src/socket_wrapper.c:5480:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf + ofs,
data/socket-wrapper-1.2.5/src/socket_wrapper.c:6098: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(omsg->msg_name, msg.msg_name, msg.msg_namelen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:6155: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(cmbuf, omsg->msg_control, omsg->msg_controllen);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:6195:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(buf + ofs,
data/socket-wrapper-1.2.5/tests/echo_srv.c:144: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 pid_str[32] = { 0 };
data/socket-wrapper-1.2.5/tests/echo_srv.c:148: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).
    fd = open(path, O_RDONLY, 0644);
data/socket-wrapper-1.2.5/tests/echo_srv.c:157: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).
    fd = open(path, O_CREAT | O_WRONLY | O_EXCL, 0644);
data/socket-wrapper-1.2.5/tests/echo_srv.c:210: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).
        fd = open("/dev/null", O_RDWR, 0);
data/socket-wrapper-1.2.5/tests/echo_srv.c:212:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            fd = open("/dev/null", O_WRONLY, 0);
data/socket-wrapper-1.2.5/tests/echo_srv.c:270: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 svc[6];
data/socket-wrapper-1.2.5/tests/echo_srv.c:532:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZE];
data/socket-wrapper-1.2.5/tests/echo_srv.c:596: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 cmsg[cmlen];
data/socket-wrapper-1.2.5/tests/echo_srv.c:634: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 ip[INET_ADDRSTRLEN] = { 0 };
data/socket-wrapper-1.2.5/tests/echo_srv.c:659: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 ip[INET_ADDRSTRLEN] = { 0 };
data/socket-wrapper-1.2.5/tests/echo_srv.c:684: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 ip[INET6_ADDRSTRLEN] = { 0 };
data/socket-wrapper-1.2.5/tests/echo_srv.c:727: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 cbuf[clen];
data/socket-wrapper-1.2.5/tests/echo_srv.c:826:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[BUFSIZE];
data/socket-wrapper-1.2.5/tests/echo_srv.c:902:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
                opts.port = atoi(optarg);
data/socket-wrapper-1.2.5/tests/test_echo_tcp_get_peer_sock_name.c:37:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[INET6_ADDRSTRLEN] = { 0 };
data/socket-wrapper-1.2.5/tests/test_echo_tcp_get_peer_sock_name.c:39:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[INET_ADDRSTRLEN] = { 0 };
data/socket-wrapper-1.2.5/tests/test_echo_tcp_sendmsg_recvmsg.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_sendmsg_recvmsg.c:47:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_sendmsg_recvmsg.c:128: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_sendmsg_recvmsg.c:129: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c:68: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c:69: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c:117: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c:118: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:69: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 send_buf[10][64];
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:70: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 recv_buf[10][64];
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:134: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 send_buf[10][64];
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:135: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 recv_buf[10][64];
data/socket-wrapper-1.2.5/tests/test_echo_udp_send_recv.c:68: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_send_recv.c:69: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_send_recv.c:119: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_send_recv.c:120: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:47:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:67:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char ip[INET_ADDRSTRLEN] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:125: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:126:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:146: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 ip[INET6_ADDRSTRLEN] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendmsg_recvmsg.c:213:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[INET_ADDRSTRLEN] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:46:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:47:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:67:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char ip[INET_ADDRSTRLEN] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:123: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:124:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:144: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 ip[INET6_ADDRSTRLEN] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:201: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_echo_udp_sendto_recvfrom.c:250:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_ioctl.c:23: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 test_tmpdir[256];
data/socket-wrapper-1.2.5/tests/test_ioctl.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 remove_cmd[PATH_MAX] = {0};
data/socket-wrapper-1.2.5/tests/test_max_sockets.c:14:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[10];
data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c:38: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 cmsgbuf[CMSG_SPACE(sizeof(int))];
data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c:41:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[8];
data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c:72:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char cmsgbuf[CMSG_SPACE(sizeof(pass_fd))];
data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c:77: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).
		pass_fd = open("/dev/zero", O_RDONLY);
data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c:94:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(CMSG_DATA(cmsg), &pass_fd, sizeof(pass_fd));
data/socket-wrapper-1.2.5/tests/test_swrap_unit.c:68: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(CMSG_DATA(cmsg), s1, s1_len);
data/socket-wrapper-1.2.5/tests/test_swrap_unit.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(CMSG_DATA(cmsg), s2, s2_len);
data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_sendmsg_recvmsg.c:41: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_sendmsg_recvmsg.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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_write_read.c:63: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_write_read.c:64: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_thread_echo_udp_send_recv.c:63: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 send_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/test_thread_echo_udp_send_recv.c:64: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 recv_buf[64] = {0};
data/socket-wrapper-1.2.5/tests/torture.c:97:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		int port = atoi(env);
data/socket-wrapper-1.2.5/tests/torture.c:151: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 start_echo_srv[1024] = {0};
data/socket-wrapper-1.2.5/tests/torture.c:235: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 remove_cmd[1024] = {0};
data/socket-wrapper-1.2.5/tests/torture.c:258: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[12] = {0}; /* -2147483648 + null byte */
data/socket-wrapper-1.2.5/tests/torture.c:266: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(s->srv_pidfile, O_RDONLY);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:530:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	SWRAP_SYMBOL_ENTRY(read);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:599:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (env_preload != NULL && strlen(env_preload) < 1024) {
data/socket-wrapper-1.2.5/src/socket_wrapper.c:606: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).
	if (env_deepbind != NULL && strlen(env_deepbind) >= 1) {
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1007:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	swrap_bind_symbol_libc(read);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:1174:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	swrap_bind_symbol_libc(read);
data/socket-wrapper-1.2.5/src/socket_wrapper.c:5873:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ssize_t read(int s, void *buf, size_t len)
data/socket-wrapper-1.2.5/tests/echo_srv.c:164:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(pid_str);
data/socket-wrapper-1.2.5/tests/echo_srv.c:226:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(0177);
data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c:78:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(s,
data/socket-wrapper-1.2.5/tests/test_echo_tcp_write_read.c:127:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(s,
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:81: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).
			iov_send[j].iov_len = strlen(send_buf[j]);
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:84: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).
			iov_recv[j].iov_len = strlen(send_buf[j]);
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:146: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).
			iov_send[j].iov_len = strlen(send_buf[j]);
data/socket-wrapper-1.2.5/tests/test_echo_tcp_writev_readv.c:149: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).
			iov_recv[j].iov_len = strlen(send_buf[j]);
data/socket-wrapper-1.2.5/tests/test_sendmsg_recvmsg_fd.c:61:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rc = read(rcv_fd, buf, sizeof(buf));
data/socket-wrapper-1.2.5/tests/test_swrap_unit.c:37: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).
	const int s1_len = strlen(s1);
data/socket-wrapper-1.2.5/tests/test_swrap_unit.c:39: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).
	const int s2_len = strlen(s2);
data/socket-wrapper-1.2.5/tests/test_thread_echo_tcp_write_read.c:73:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(s,
data/socket-wrapper-1.2.5/tests/torture.c:96:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (env != NULL && env[0] != '\0' && strlen(env) < 6) {
data/socket-wrapper-1.2.5/tests/torture.c:123: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(p) + 1 + strlen(TORTURE_PCAP_FILE) + 1;
data/socket-wrapper-1.2.5/tests/torture.c:123:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(p) + 1 + strlen(TORTURE_PCAP_FILE) + 1;
data/socket-wrapper-1.2.5/tests/torture.c:131: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(p) + 1 + strlen(TORTURE_ECHO_SRV_PIDFILE) + 1;
data/socket-wrapper-1.2.5/tests/torture.c:131:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(p) + 1 + strlen(TORTURE_ECHO_SRV_PIDFILE) + 1;
data/socket-wrapper-1.2.5/tests/torture.c:191:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(50000L); /* 0.05s * 20 */
data/socket-wrapper-1.2.5/tests/torture.c:271:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, buf, sizeof(buf));
data/socket-wrapper-1.2.5/tests/torture.c:289:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(5000);

ANALYSIS SUMMARY:

Hits = 160
Lines analyzed = 12808 in approximately 0.25 seconds (50925 lines/second)
Physical Source Lines of Code (SLOC) = 9649
Hits@level = [0] 103 [1]  26 [2] 109 [3]  19 [4]   6 [5]   0
Hits@level+ = [0+] 263 [1+] 160 [2+] 134 [3+]  25 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 27.2567 [1+] 16.582 [2+] 13.8874 [3+] 2.59094 [4+] 0.621826 [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.