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/hitch-1.6.1/src/configuration.c
Examining data/hitch-1.6.1/src/configuration.h
Examining data/hitch-1.6.1/src/foreign/asn_gentm.c
Examining data/hitch-1.6.1/src/foreign/asn_gentm.h
Examining data/hitch-1.6.1/src/foreign/flopen.c
Examining data/hitch-1.6.1/src/foreign/flopen.h
Examining data/hitch-1.6.1/src/foreign/miniobj.h
Examining data/hitch-1.6.1/src/foreign/uthash.h
Examining data/hitch-1.6.1/src/foreign/vas.c
Examining data/hitch-1.6.1/src/foreign/vas.h
Examining data/hitch-1.6.1/src/foreign/vpf.c
Examining data/hitch-1.6.1/src/foreign/vpf.h
Examining data/hitch-1.6.1/src/foreign/vqueue.h
Examining data/hitch-1.6.1/src/foreign/vsa.c
Examining data/hitch-1.6.1/src/foreign/vsa.h
Examining data/hitch-1.6.1/src/foreign/vsb.c
Examining data/hitch-1.6.1/src/foreign/vsb.h
Examining data/hitch-1.6.1/src/hitch.c
Examining data/hitch-1.6.1/src/hitch.h
Examining data/hitch-1.6.1/src/hssl_locks.c
Examining data/hitch-1.6.1/src/hssl_locks.h
Examining data/hitch-1.6.1/src/logging.c
Examining data/hitch-1.6.1/src/logging.h
Examining data/hitch-1.6.1/src/ocsp.c
Examining data/hitch-1.6.1/src/ocsp.h
Examining data/hitch-1.6.1/src/proxyv2.h
Examining data/hitch-1.6.1/src/ringbuffer.c
Examining data/hitch-1.6.1/src/ringbuffer.h
Examining data/hitch-1.6.1/src/shctx.c
Examining data/hitch-1.6.1/src/shctx.h
Examining data/hitch-1.6.1/src/ssl_err.h
Examining data/hitch-1.6.1/src/sysl_tbl.h
Examining data/hitch-1.6.1/src/util/parse_proxy_v2.c

FINAL RESULTS:

data/hitch-1.6.1/src/configuration.c:116:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__((format(printf, 1, 2)));
data/hitch-1.6.1/src/configuration.c:126:8:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	len = vsnprintf(buf, (sizeof(buf) - 1), fmt, args);
data/hitch-1.6.1/src/configuration.c:1647: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, ALPN_NPN_PREFIX_STR " Warning: Hitch has been"
data/hitch-1.6.1/src/foreign/flopen.h:34:58:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
int flopen(const char *, int, ...) __attribute__((format(printf, 1, 3)));
data/hitch-1.6.1/src/foreign/uthash.h:286:29:  [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.
#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
data/hitch-1.6.1/src/foreign/vsb.c:355:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		len = vsnprintf(&s->s_buf[s->s_len], VSB_FREESPACE(s) + 1,
data/hitch-1.6.1/src/foreign/vsb.h:67:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__((format(printf, 2, 3)));
data/hitch-1.6.1/src/hitch.c:1550:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "[%s]:%s", abuf, pbuf);
data/hitch-1.6.1/src/hitch.c:1552:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "%s:%s", abuf, pbuf);
data/hitch-1.6.1/src/hitch.c:2173:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len = sprintf(p, "PROXY TCP4 %s %s %s %s\r\n", src_addr,
data/hitch-1.6.1/src/hitch.c:2177:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		len = sprintf(p, "PROXY TCP6 %s %s %s %s\r\n", src_addr,
data/hitch-1.6.1/src/logging.c:125:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(logfile, buf, ap1);
data/hitch-1.6.1/src/logging.c:192: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(whatbuf, sizeof(whatbuf), what, ap);
data/hitch-1.6.1/src/logging.h:58:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__((format(printf, 2, 3)));
data/hitch-1.6.1/src/logging.h:60:24:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	__attribute__((format(printf, 3, 4)));
data/hitch-1.6.1/src/configuration.c:1457:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, SHORT_OPTS,
data/hitch-1.6.1/src/configuration.c:1481:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, SHORT_OPTS,
data/hitch-1.6.1/src/hitch.c:3096:6:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
	if (chroot(CONFIG->CHROOT) == -1)
data/hitch-1.6.1/src/configuration.c:111: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 error_buf[CONFIG_BUF_SIZE];
data/hitch-1.6.1/src/configuration.c:112: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 tmp_buf[150];
data/hitch-1.6.1/src/configuration.c:122:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[CONFIG_BUF_SIZE] = "";
data/hitch-1.6.1/src/configuration.c:132: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(error_buf, buf, len);
data/hitch-1.6.1/src/configuration.c:383:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char port_buf[PORT_LEN];
data/hitch-1.6.1/src/configuration.c:384:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char addr_buf[ADDR_LEN];
data/hitch-1.6.1/src/configuration.c:437: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(port_buf, ptr, (x - ptr));
data/hitch-1.6.1/src/configuration.c:445:10:  [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 p = atoi(port_buf);
data/hitch-1.6.1/src/configuration.c:650:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[150];
data/hitch-1.6.1/src/configuration.c:1066:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(file, "r");
data/hitch-1.6.1/src/configuration.c:1138:2:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	strcat(tmp_buf, "]:");
data/hitch-1.6.1/src/foreign/flopen.c:72:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((fd = open(path, flags, mode)) == -1)
data/hitch-1.6.1/src/foreign/vpf.c:49:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	pf_path[MAXPATHLEN + 1];
data/hitch-1.6.1/src/foreign/vpf.c:76:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[16], *endptr;
data/hitch-1.6.1/src/foreign/vpf.c:79:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_RDONLY);
data/hitch-1.6.1/src/foreign/vpf.c:165:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pidstr[16];
data/hitch-1.6.1/src/foreign/vsa.c:241: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(&sua->sa, s, l);
data/hitch-1.6.1/src/foreign/vsa.c:275: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(&sua->sa, s, l);
data/hitch-1.6.1/src/foreign/vsa.c:366: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(sua2, sua, vsa_suckaddr_len);
data/hitch-1.6.1/src/foreign/vsb.c:151:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(newbuf, s->s_buf, s->s_size);
data/hitch-1.6.1/src/foreign/vsb.c:297:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->s_buf + s->s_len, buf, len);
data/hitch-1.6.1/src/hitch.c:218:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 unsigned char shared_secret[SHA_DIGEST_LENGTH];
data/hitch-1.6.1/src/hitch.c:225: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 tcp_proxy_line[128] = "";
data/hitch-1.6.1/src/hitch.c:432: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 msg[SHSESS_MAX_ENCODED_LEN], hash[EVP_MAX_MD_SIZE];
data/hitch-1.6.1/src/hitch.c:482:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(msg+len, &ncdate, sizeof(ncdate));
data/hitch-1.6.1/src/hitch.c:578: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(ifr.ifr_name, CONFIG->SHCUPD_MCASTIF,
data/hitch-1.6.1/src/hitch.c:597: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).
				    atoi(CONFIG->SHCUPD_MCASTIF);
data/hitch-1.6.1/src/hitch.c:626:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			ttl = (unsigned char)atoi(CONFIG->SHCUPD_MCASTTTL);
data/hitch-1.6.1/src/hitch.c:655: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(ifr.ifr_name, CONFIG->SHCUPD_MCASTIF,
data/hitch-1.6.1/src/hitch.c:664: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).
				    atoi(CONFIG->SHCUPD_MCASTIF);
data/hitch-1.6.1/src/hitch.c:692:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			hops = atoi(CONFIG->SHCUPD_MCASTTTL);
data/hitch-1.6.1/src/hitch.c:1420:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[INET6_ADDRSTRLEN+20];
data/hitch-1.6.1/src/hitch.c:1421:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char abuf[INET6_ADDRSTRLEN];
data/hitch-1.6.1/src/hitch.c:1422:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[8];
data/hitch-1.6.1/src/hitch.c:1539: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(&ls->addr, it->ai_addr, it->ai_addrlen);
data/hitch-1.6.1/src/hitch.c:2013:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dst + 3, val, len);
data/hitch-1.6.1/src/hitch.c:2041: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->sig, PP2_SIG, sizeof PP2_SIG);
data/hitch-1.6.1/src/hitch.c:2051: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(&p->addr.ipv4.src_addr, &r->sa4.sin_addr.s_addr,
data/hitch-1.6.1/src/hitch.c:2053: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(&p->addr.ipv4.src_port, &r->sa4.sin_port,
data/hitch-1.6.1/src/hitch.c:2057:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&p->addr.ipv4.dst_addr, &l->sa4.sin_addr.s_addr,
data/hitch-1.6.1/src/hitch.c:2059: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(&p->addr.ipv4.dst_port, &l->sa4.sin_port,
data/hitch-1.6.1/src/hitch.c:2066: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(&p->addr.ipv6.src_addr, &r->sa6.sin6_addr.s6_addr,
data/hitch-1.6.1/src/hitch.c:2068: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(&p->addr.ipv6.src_port, &r->sa6.sin6_port,
data/hitch-1.6.1/src/hitch.c:2072: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(&p->addr.ipv6.dst_addr, &l->sa6.sin6_addr.s6_addr,
data/hitch-1.6.1/src/hitch.c:2074: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(&p->addr.ipv6.dst_port, &l->sa6.sin6_port,
data/hitch-1.6.1/src/hitch.c:2155:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_addr[INET6_ADDRSTRLEN+1], dst_addr[INET6_ADDRSTRLEN+1];
data/hitch-1.6.1/src/hitch.c:2156:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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_port[8], dst_port[8];
data/hitch-1.6.1/src/hitch.c:2195: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(ring_pnt,
data/hitch-1.6.1/src/hitch.c:2201: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(ring_pnt, &((struct sockaddr_in *)
data/hitch-1.6.1/src/hitch.c:2344: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(ring, tcp_proxy_line, proxy - tcp_proxy_line);
data/hitch-1.6.1/src/hitch.c:3978: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(&(wu.payload.addr), addr, len);
data/hitch-1.6.1/src/hitch.c:4002:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if ((f = fopen(CONFIG->LOG_FILENAME, "a")) == NULL) {
data/hitch-1.6.1/src/logging.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[1024];
data/hitch-1.6.1/src/logging.c:113:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			logfile = fopen(CONFIG->LOG_FILENAME, "a");
data/hitch-1.6.1/src/logging.c:142:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/hitch-1.6.1/src/logging.c:143:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET6_ADDRSTRLEN+1];
data/hitch-1.6.1/src/logging.c:144:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char sbuf[8];
data/hitch-1.6.1/src/logging.c:157:3:  [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(hbuf, "n/a");
data/hitch-1.6.1/src/logging.c:158:3:  [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(sbuf, "n/a");
data/hitch-1.6.1/src/logging.c:186:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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/hitch-1.6.1/src/logging.c:187:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char whatbuf[1024];
data/hitch-1.6.1/src/ocsp.c:162:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, staple->staple, staple->len);
data/hitch-1.6.1/src/ocsp.c:353:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(VSB_data(tmpfn));
data/hitch-1.6.1/src/ocsp.c:439: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 md_val[EVP_MAX_MD_SIZE];
data/hitch-1.6.1/src/shctx.c:28: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		key_data[SSL_MAX_SSL_SESSION_ID_LENGTH];
data/hitch-1.6.1/src/shctx.c:31: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		data[SHSESS_MAX_DATA_LEN];
data/hitch-1.6.1/src/shctx.c:167: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((dst), (src), (slen));			\
data/hitch-1.6.1/src/shctx.c:190: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 encsess[SHSESS_MAX_ENCODED_LEN];
data/hitch-1.6.1/src/shctx.c:216: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(shsess->data, data, data_len);
data/hitch-1.6.1/src/shctx.c:247: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 data[SHSESS_MAX_DATA_LEN], *p;
data/hitch-1.6.1/src/shctx.c:248: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 padded_key[SSL_MAX_SSL_SESSION_ID_LENGTH];
data/hitch-1.6.1/src/shctx.c:273:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data, shsess->data, shsess->data_len);
data/hitch-1.6.1/src/shctx.c:295: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 padded_key[SSL_MAX_SSL_SESSION_ID_LENGTH];
data/hitch-1.6.1/src/shctx.c:341:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(shsess->data, encsess+SSL_MAX_SSL_SESSION_ID_LENGTH, shsess->data_len);
data/hitch-1.6.1/src/util/parse_proxy_v2.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 buf1[256], buf2[256];
data/hitch-1.6.1/src/util/parse_proxy_v2.c:217: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 proxy_header[PP2_HEADER_MAX + 1];
data/hitch-1.6.1/src/configuration.c:264:49:  [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).
	HASH_ADD_KEYPTR(hh, r->LISTEN_ARGS, fa->pspec, strlen(fa->pspec), fa);
data/hitch-1.6.1/src/configuration.c:328:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(v) <= 0)
data/hitch-1.6.1/src/configuration.c:358:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) > 104) {
data/hitch-1.6.1/src/configuration.c:398:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) > ADDR_LEN) {
data/hitch-1.6.1/src/configuration.c:425:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr_buf, ptr, addrlen);
data/hitch-1.6.1/src/configuration.c:584: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 (cf->filename == NULL || strlen(cf->filename) <= 0)
data/hitch-1.6.1/src/configuration.c:616:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    strlen(cf->priv_key_filename) > 0) {
data/hitch-1.6.1/src/configuration.c:642:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	HASH_ADD_KEYPTR(hh, *dst, cf->filename, strlen(cf->filename), cf);
data/hitch-1.6.1/src/configuration.c:653:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) >= sizeof buf) {
data/hitch-1.6.1/src/configuration.c:814:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    strlen(fa->pspec), fa);
data/hitch-1.6.1/src/configuration.c:842:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	assert(strlen(k) >= 2);
data/hitch-1.6.1/src/configuration.c:849:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:853:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:901:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0)
data/hitch-1.6.1/src/configuration.c:912:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:929:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:941:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:961:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:993:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:1018:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if (strlen(v) > 0) {
data/hitch-1.6.1/src/configuration.c:1063:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (file == NULL || strlen(file) < 1 || strcmp(file, "-") == 0)
data/hitch-1.6.1/src/configuration.c:1106:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(tmp_buf, pw->pw_name, sizeof(tmp_buf));
data/hitch-1.6.1/src/configuration.c:1120:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(tmp_buf, gr->gr_name, sizeof(tmp_buf));
data/hitch-1.6.1/src/configuration.c:1133:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(tmp_buf, "[");
data/hitch-1.6.1/src/configuration.c:1135:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(tmp_buf, "*");
data/hitch-1.6.1/src/configuration.c:1137:3:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
		strncat(tmp_buf, host, 40);
data/hitch-1.6.1/src/configuration.c:1139:2:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
	strncat(tmp_buf, port, 5);
data/hitch-1.6.1/src/configuration.c:1175:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		plen = strlen(pemdir) + strlen(d[i]->d_name) + 1;
data/hitch-1.6.1/src/configuration.c:1175:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		plen = strlen(pemdir) + strlen(d[i]->d_name) + 1;
data/hitch-1.6.1/src/configuration.c:1343: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(cfg->ALPN_PROTOS);
data/hitch-1.6.1/src/foreign/uthash.h:262:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    HASH_FIND(hh,head,findstr,(unsigned)strlen(findstr),out)
data/hitch-1.6.1/src/foreign/uthash.h:264:48:  [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).
    HASH_ADD(hh,head,strfield[0],(unsigned int)strlen(add->strfield),add)
data/hitch-1.6.1/src/foreign/uthash.h:266:48:  [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).
    HASH_REPLACE(hh,head,strfield[0],(unsigned)strlen(add->strfield),add,replaced)
data/hitch-1.6.1/src/foreign/vpf.c:83:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	i = read(fd, buf, sizeof(buf) - 1);
data/hitch-1.6.1/src/foreign/vpf.c:193:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
data/hitch-1.6.1/src/foreign/vpf.c:193:56:  [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 (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
data/hitch-1.6.1/src/foreign/vsb.c:502:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(p);
data/hitch-1.6.1/src/hitch.c:571:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(CONFIG->SHCUPD_MCASTIF) > IFNAMSIZ) {
data/hitch-1.6.1/src/hitch.c:579:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				    strlen(CONFIG->SHCUPD_MCASTIF));
data/hitch-1.6.1/src/hitch.c:648:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(CONFIG->SHCUPD_MCASTIF) > IFNAMSIZ) {
data/hitch-1.6.1/src/hitch.c:656:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				    strlen(CONFIG->SHCUPD_MCASTIF));
data/hitch-1.6.1/src/hitch.c:1073:3:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strlen("hitch")));
data/hitch-1.6.1/src/hitch.c:1230:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		HASH_ADD_KEYPTR(hh, *sn_tab, key, strlen(key), sn);
data/hitch-1.6.1/src/hitch.c:1372: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).
			    strlen(so->filename), so);
data/hitch-1.6.1/src/hitch.c:1607: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).
		    so->filename, strlen(so->filename), so);
data/hitch-1.6.1/src/hitch.c:2007:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(val);
data/hitch-1.6.1/src/hitch.c:2095:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			tlv_len = strlen(tlv_tok);
data/hitch-1.6.1/src/hitch.c:2787:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	r = read(w->fd, &wu, sizeof(wu));
data/hitch-1.6.1/src/hitch.c:3067:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	(void) umask(027);
data/hitch-1.6.1/src/hitch.c:3731:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    strlen(sc->filename), sc);
data/hitch-1.6.1/src/hitch.c:3968:8:  [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.
		rv = usleep(CONFIG->BACKEND_REFRESH_TIME*1000000);
data/hitch-1.6.1/src/ocsp.c:347:8:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	(void)umask(027);
data/hitch-1.6.1/src/ocsp.c:458:38:  [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 (EVP_DigestUpdate(mdctx, certfn, strlen(certfn)) != 1) {
data/hitch-1.6.1/src/util/parse_proxy_v2.c:222:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = read(STDIN_FILENO, proxy_header, PP2_HEADER_MAX);

ANALYSIS SUMMARY:

Hits = 148
Lines analyzed = 12191 in approximately 0.40 seconds (30139 lines/second)
Physical Source Lines of Code (SLOC) = 8994
Hits@level = [0] 152 [1]  54 [2]  76 [3]   3 [4]  15 [5]   0
Hits@level+ = [0+] 300 [1+] 148 [2+]  94 [3+]  18 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 33.3556 [1+] 16.4554 [2+] 10.4514 [3+] 2.00133 [4+] 1.66778 [5+]   0
Dot directories skipped = 3 (--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.