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/lua-cqueues-20200726/mk/vendor.cc
Examining data/lua-cqueues-20200726/src/cqueues.c
Examining data/lua-cqueues-20200726/src/cqueues.h
Examining data/lua-cqueues-20200726/src/dns.c
Examining data/lua-cqueues-20200726/src/lib/dns.c
Examining data/lua-cqueues-20200726/src/lib/dns.h
Examining data/lua-cqueues-20200726/src/lib/fifo.h
Examining data/lua-cqueues-20200726/src/lib/kpoll.c
Examining data/lua-cqueues-20200726/src/lib/llrb.h
Examining data/lua-cqueues-20200726/src/lib/notify.c
Examining data/lua-cqueues-20200726/src/lib/notify.h
Examining data/lua-cqueues-20200726/src/lib/socket.c
Examining data/lua-cqueues-20200726/src/lib/socket.h
Examining data/lua-cqueues-20200726/src/notify.c
Examining data/lua-cqueues-20200726/src/signal.c
Examining data/lua-cqueues-20200726/src/socket.c
Examining data/lua-cqueues-20200726/src/thread.c
Examining data/lua-cqueues-20200726/util/tcp-urgent.c
Examining data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c
Examining data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.h
Examining data/lua-cqueues-20200726/vendor/compat53/lbitlib.c
Examining data/lua-cqueues-20200726/vendor/compat53/lprefix.h
Examining data/lua-cqueues-20200726/vendor/compat53/lstrlib.c
Examining data/lua-cqueues-20200726/vendor/compat53/ltablib.c
Examining data/lua-cqueues-20200726/vendor/compat53/lutf8lib.c
Examining data/lua-cqueues-20200726/vendor/compat53/tests/testmod.c

FINAL RESULTS:

data/lua-cqueues-20200726/src/cqueues.h:625:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(descr, "stream socket", sizeof descr - 1);
data/lua-cqueues-20200726/src/cqueues.h:627:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(descr, "dgram socket", sizeof descr - 1);
data/lua-cqueues-20200726/src/cqueues.h:629:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(descr, "other socket", sizeof descr - 1);
data/lua-cqueues-20200726/src/cqueues.h:632:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(descr, "fifo file", sizeof descr - 1);
data/lua-cqueues-20200726/src/cqueues.h:634:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(descr, "regular file", sizeof descr - 1);
data/lua-cqueues-20200726/src/cqueues.h:636:4:  [5] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
			strncat(descr, "other file", sizeof descr - 1);
data/lua-cqueues-20200726/src/lib/socket.c:858:13:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
			if (0 != chmod(path, (opts->sun_mode & 0777)))
data/lua-cqueues-20200726/src/lib/dns.c:243:26:  [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.
	do { if (DNS_DEBUG > 0) fprintf(stderr, fmt "%.1s", __func__, __LINE__, __VA_ARGS__); } while (0)
data/lua-cqueues-20200726/src/lib/dns.c:8925:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/src/lib/fifo.h:488:26:  [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.
FIFO_NOTUSED FIFO_FORMAT(printf, 2, 3) static int fifo_printf(struct fifo *fifo, const char *fmt, ...) {
data/lua-cqueues-20200726/src/lib/fifo.h:498:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		count = vsnprintf(iov.iov_base, iov.iov_len, fmt, ap);
data/lua-cqueues-20200726/src/lib/socket.c:265:24:  [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 SAY_(fmt, ...) fprintf(stderr, fmt "%s", __FILE__, __LINE__, __func__, __VA_ARGS__);
data/lua-cqueues-20200726/src/lib/socket.c:357:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/src/lib/socket.c:367:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/src/lib/socket.c:377:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/src/lib/socket.c:389:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/src/lib/socket.c:3169:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/src/lib/socket.c:3429:4:  [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, USAGE, MAIN.arg0);
data/lua-cqueues-20200726/util/tcp-urgent.c:63:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, ap);
data/lua-cqueues-20200726/util/tcp-urgent.c:375:2:  [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(fp, \
data/lua-cqueues-20200726/vendor/compat53/lprefix.h:139:36:  [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.
#      define l_sprintf(s,sz,f,i) (snprintf(s, sz, f, i))
data/lua-cqueues-20200726/vendor/compat53/lprefix.h:141:48:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
#      define l_sprintf(s,sz,f,i) ((void)(sz), sprintf(s, f, i))
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1010:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(form + l - 1, lenmod);
data/lua-cqueues-20200726/vendor/compat53/tests/testmod.c:290:29:  [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.
  return luaL_execresult(L, system(cmd));
data/lua-cqueues-20200726/src/lib/dns.c:435:20:  [3] (random) random:
  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.
#define DNS_RANDOM	random
data/lua-cqueues-20200726/src/lib/dns.c:9874:21:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while (-1 != (ch = getopt(argc, argv, "q:t:c:n:l:z:s:vVh"))) {
data/lua-cqueues-20200726/src/lib/notify.c:1223:23:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while (-1 != (optc = getopt(argc, argv, "fh"))) {
data/lua-cqueues-20200726/src/lib/socket.c:406:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((debug = getenv("SOCKET_DEBUG")) || (debug = getenv("SO_DEBUG"))) {
data/lua-cqueues-20200726/src/lib/socket.c:406:51:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ((debug = getenv("SOCKET_DEBUG")) || (debug = getenv("SO_DEBUG"))) {
data/lua-cqueues-20200726/src/lib/socket.c:3406:22:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while (-1 != (opt = getopt(argc, argv, "vVh"))) {
data/lua-cqueues-20200726/util/tcp-urgent.c:393:23:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while (-1 != (optc = getopt(argc, argv, SHORTOPTS))) {
data/lua-cqueues-20200726/vendor/compat53/tests/testmod.c:306:7:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
  if (tmpnam(filename)) {
data/lua-cqueues-20200726/src/cqueues.c:737: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[64];
data/lua-cqueues-20200726/src/cqueues.h:507:45:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define cqs_static_assert(cond, msg) extern char CQS_XPASTE(assert_, __LINE__)[cqs_inline_assert(cond)]
data/lua-cqueues-20200726/src/cqueues.h:612:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char descr[64] = "";
data/lua-cqueues-20200726/src/dns.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 name[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/dns.c:156: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(rr->name, name, namelen);
data/lua-cqueues-20200726/src/dns.c:276:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET_ADDRSTRLEN + 1] = "";
data/lua-cqueues-20200726/src/dns.c:472:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET6_ADDRSTRLEN + 1] = "";
data/lua-cqueues-20200726/src/dns.c:789:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(P->data, data, P->size);
data/lua-cqueues-20200726/src/dns.c:793: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->data, data, size);
data/lua-cqueues-20200726/src/dns.c:1055:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[1024];
data/lua-cqueues-20200726/src/dns.c:1059:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	if (!(fp = tmpfile()))
data/lua-cqueues-20200726/src/dns.c:1241: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 ns[INET6_ADDRSTRLEN + 1] = "";
data/lua-cqueues-20200726/src/dns.c:1448:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ipbuf[INET6_ADDRSTRLEN + 1];
data/lua-cqueues-20200726/src/dns.c:1538:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char dn[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/dns.c:1569:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[1024];
data/lua-cqueues-20200726/src/dns.c:1573:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	if (!(fp = tmpfile()))
data/lua-cqueues-20200726/src/dns.c:1763:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[1024];
data/lua-cqueues-20200726/src/dns.c:1767:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	if (!(fp = tmpfile()))
data/lua-cqueues-20200726/src/dns.c:1940:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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 + 1] = "";
data/lua-cqueues-20200726/src/dns.c:1986:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[1024];
data/lua-cqueues-20200726/src/dns.c:1990:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	if (!(fp = tmpfile()))
data/lua-cqueues-20200726/src/lib/dns.c:222:45:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define dns_static_assert(cond, msg) extern char DNS_PP_XPASTE(dns_assert_, __LINE__)[sizeof (int[1 - 2*!(cond)])]
data/lua-cqueues-20200726/src/lib/dns.c:489: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(tea->key, key, sizeof tea->key);
data/lua-cqueues-20200726/src/lib/dns.c:652:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const unsigned char sbox[256] =
data/lua-cqueues-20200726/src/lib/dns.c:782: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, n);
data/lua-cqueues-20200726/src/lib/dns.c:923: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 a_path[DNS_SUNPATHMAX + 1], b_path[sizeof a_path];
data/lua-cqueues-20200726/src/lib/dns.c:1216:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mode_cloexec[32];
data/lua-cqueues-20200726/src/lib/dns.c:1228:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(fp = fopen(path, mode_cloexec)))
data/lua-cqueues-20200726/src/lib/dns.c:1233:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(fp = fopen(path, mode_cloexec))) {
data/lua-cqueues-20200726/src/lib/dns.c:1236: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).
		if (!(fp = fopen(path, mode)))
data/lua-cqueues-20200726/src/lib/dns.c:1344:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b->p, src, n);
data/lua-cqueues-20200726/src/lib/dns.c:1659: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->data, P0->data, P->end);
data/lua-cqueues-20200726/src/lib/dns.c:1879:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pretty[sizeof any * 2];
data/lua-cqueues-20200726/src/lib/dns.c:2031:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:2071: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(dst, &data[src], DNS_PP_MIN(lim, len));
data/lua-cqueues-20200726/src/lib/dns.c:2195:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			((char *)dst)[DNS_PP_MIN(len, lim - 1)]	= '\0';
data/lua-cqueues-20200726/src/lib/dns.c:2208:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	if (((const char *)src)[len - 1] != '.') {
data/lua-cqueues-20200726/src/lib/dns.c:2210:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			((char *)dst)[len]	= '.';
data/lua-cqueues-20200726/src/lib/dns.c:2215: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 *)dst)[DNS_PP_MIN(lim - 1, len)]	= '\0';
data/lua-cqueues-20200726/src/lib/dns.c:2240: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 *)dst)[DNS_PP_MIN(lim - 1, len)]	= '\0';
data/lua-cqueues-20200726/src/lib/dns.c:2292:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		struct { unsigned char label[DNS_D_MAXLABEL + 1]; size_t len; unsigned short p, x, y; } a, b;
data/lua-cqueues-20200726/src/lib/dns.c:2389:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)dst)[dstp]	= '.';
data/lua-cqueues-20200726/src/lib/dns.c:2396: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.
					((unsigned char *)dst)[DNS_PP_MIN(dstp, lim - 1)]	= '\0';
data/lua-cqueues-20200726/src/lib/dns.c:2407: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(&((unsigned char *)dst)[dstp], &P->data[src], DNS_PP_MIN(len, lim - dstp));
data/lua-cqueues-20200726/src/lib/dns.c:2407:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				memcpy(&((unsigned char *)dst)[dstp], &P->data[src], DNS_PP_MIN(len, lim - dstp));
data/lua-cqueues-20200726/src/lib/dns.c:2413:16:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 *)dst)[dstp]	= '.';
data/lua-cqueues-20200726/src/lib/dns.c:2442:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		((unsigned char *)dst)[DNS_PP_MIN(dstp, lim - 1)]	= '\0';
data/lua-cqueues-20200726/src/lib/dns.c:2449:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		((unsigned char *)dst)[DNS_PP_MIN(dstp, lim - 1)]	= '\0';
data/lua-cqueues-20200726/src/lib/dns.c:2476:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:2513: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 dn[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:2668:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host0[DNS_D_MAXNAME + 1], host1[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:2739: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 dn[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:3069:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET_ADDRSTRLEN + 1]	= "0.0.0.0";
data/lua-cqueues-20200726/src/lib/dns.c:3081: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(aaaa->addr.s6_addr, &P->data[rr->rd.p], sizeof aaaa->addr.s6_addr);
data/lua-cqueues-20200726/src/lib/dns.c:3094: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->data[P->end], aaaa->addr.s6_addr, sizeof aaaa->addr.s6_addr);
data/lua-cqueues-20200726/src/lib/dns.c:3116:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const unsigned char hex[16] = "0123456789abcdef";
data/lua-cqueues-20200726/src/lib/dns.c:3138:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET6_ADDRSTRLEN + 1]	= "::";
data/lua-cqueues-20200726/src/lib/dns.c:3748: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(fp->digest.sha1, &P->data[p], sizeof fp->digest.sha1);
data/lua-cqueues-20200726/src/lib/dns.c:3774: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->data[p], fp->digest.sha1, sizeof fp->digest.sha1);
data/lua-cqueues-20200726/src/lib/dns.c:3809:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const unsigned char hex[16] = "0123456789abcdef";
data/lua-cqueues-20200726/src/lib/dns.c:3871: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.b[dst.p], &src.b[src.p], n);
data/lua-cqueues-20200726/src/lib/dns.c:3914: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.b[dst.p], &src.b[src.p], n);
data/lua-cqueues-20200726/src/lib/dns.c:4028: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(any->rdata.data, &P->data[rr->rd.p], rr->rd.len);
data/lua-cqueues-20200726/src/lib/dns.c:4047: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->data[P->end], any->rdata.data, any->rdata.len);
data/lua-cqueues-20200726/src/lib/dns.c:4108:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:4109: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 arpa[73 + 1];
data/lua-cqueues-20200726/src/lib/dns.c:4209:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char word[DNS_PP_MAX(INET6_ADDRSTRLEN, DNS_D_MAXNAME) + 1];
data/lua-cqueues-20200726/src/lib/dns.c:4286:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET6_ADDRSTRLEN + 1];
data/lua-cqueues-20200726/src/lib/dns.c:4320: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(&ent->addr.a6, addr, sizeof ent->addr.a6);
data/lua-cqueues-20200726/src/lib/dns.c:4326: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(&ent->addr.a4, addr, sizeof ent->addr.a4);
data/lua-cqueues-20200726/src/lib/dns.c:4359:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:4624: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.
	struct { char buf[128], *p; } addr = { "", addr.buf };
data/lua-cqueues-20200726/src/lib/dns.c:4673:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char words[6][DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:4881:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char *token[16];
data/lua-cqueues-20200726/src/lib/dns.c:4883:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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], *tp, *cp;
data/lua-cqueues-20200726/src/lib/dns.c:5112:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char map[DNS_NSSCONF_LAST] = {
data/lua-cqueues-20200726/src/lib/dns.c:5128:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char *const map[DNS_NSSCONF_LAST] = {
data/lua-cqueues-20200726/src/lib/dns.c:5148:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char lookup[sizeof resconf->lookup] = "", *lp;
data/lua-cqueues-20200726/src/lib/dns.c:5465: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 addr[INET6_ADDRSTRLEN + 1]	= "[INVALID]";
data/lua-cqueues-20200726/src/lib/dns.c:5531: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 addr[INET6_ADDRSTRLEN + 1]	= "[INVALID]";
data/lua-cqueues-20200726/src/lib/dns.c:5548: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 zone[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:5660: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 addr[INET6_ADDRSTRLEN];
data/lua-cqueues-20200726/src/lib/dns.c:5747: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(&soa->addrs[i].ss, sa, dns_sa_len(sa));
data/lua-cqueues-20200726/src/lib/dns.c:5792: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(&tmp.sin, &resconf->nameserver[i], sizeof tmp.sin);
data/lua-cqueues-20200726/src/lib/dns.c:5907:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char zone[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:5989:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[INET6_ADDRSTRLEN];
data/lua-cqueues-20200726/src/lib/dns.c:6203:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&tmp, local, dns_sa_len(local));
data/lua-cqueues-20200726/src/lib/dns.c:6277:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:6363: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(&so->local, local, dns_sa_len(local));
data/lua-cqueues-20200726/src/lib/dns.c:6463: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(&so->remote, host, dns_sa_len(host));
data/lua-cqueues-20200726/src/lib/dns.c:6489:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:6906:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:7190:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:7284:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:7285:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:7562:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char addr[INET_ADDRSTRLEN + 1];
data/lua-cqueues-20200726/src/lib/dns.c:8006:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:8023:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:8024:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char i_cname[DNS_D_MAXNAME + 1], g_cname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:8246: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(&saddr.sin.sin_addr, any, sizeof saddr.sin.sin_addr);
data/lua-cqueues-20200726/src/lib/dns.c:8253: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(&saddr.sin6.sin6_addr, any, sizeof saddr.sin6.sin6_addr);
data/lua-cqueues-20200726/src/lib/dns.c:8277:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	(*ent)->ai_addr		= memcpy((unsigned char *)*ent + sizeof **ent, &saddr, dns_sa_len(&saddr));
data/lua-cqueues-20200726/src/lib/dns.c:8281:26:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(*ent)->ai_canonname	= memcpy((unsigned char *)*ent + sizeof **ent + dns_sa_len(&saddr), cname, clen + 1);
data/lua-cqueues-20200726/src/lib/dns.c:8311:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:8543:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[DNS_PP_MAX(INET_ADDRSTRLEN, INET6_ADDRSTRLEN) + 1];
data/lua-cqueues-20200726/src/lib/dns.c:8613:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[16];
data/lua-cqueues-20200726/src/lib/dns.c:8648:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-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[128];
data/lua-cqueues-20200726/src/lib/dns.c:8669:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[8];
data/lua-cqueues-20200726/src/lib/dns.c:8747: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 dns_opcodes[16][16] = {
data/lua-cqueues-20200726/src/lib/dns.c:8756:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char _tmp[48] = "";
data/lua-cqueues-20200726/src/lib/dns.c:8800: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 dns_rcodes[32][16] = {
data/lua-cqueues-20200726/src/lib/dns.c:8868:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		const char *path[8];
data/lua-cqueues-20200726/src/lib/dns.c:8886: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 ln[sizeof tmpl];
data/lua-cqueues-20200726/src/lib/dns.c:8895: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(ln, tmpl, sizeof ln);
data/lua-cqueues-20200726/src/lib/dns.c:8961: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 + osize, src, len);
data/lua-cqueues-20200726/src/lib/dns.c:8969:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char buf[1024];
data/lua-cqueues-20200726/src/lib/dns.c:9121:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pretty[sizeof any * 2];
data/lua-cqueues-20200726/src/lib/dns.c:9203:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:9223:8:  [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).
		rp = atoi(argv[1]);
data/lua-cqueues-20200726/src/lib/dns.c:9230: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(pkt->data, src, len);
data/lua-cqueues-20200726/src/lib/dns.c:9318:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char qname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:9357:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:9372:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	hi	= (--argc > 0)? atoi(argv[argc]) : 8;
data/lua-cqueues-20200726/src/lib/dns.c:9373:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	lo	= (--argc > 0)? atoi(argv[argc]) : 0;
data/lua-cqueues-20200726/src/lib/dns.c:9391:16:  [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).
		n = 0xffff & atoi(argv[argc]);
data/lua-cqueues-20200726/src/lib/dns.c:9392:31:  [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).
		r = (--argc > 0)? (unsigned)atoi(argv[argc]) : dns_random();
data/lua-cqueues-20200726/src/lib/dns.c:9407: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 b[32];
data/lua-cqueues-20200726/src/lib/dns.c:9410:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	n	= (argc > 1)? atoi(argv[1]) : 32;
data/lua-cqueues-20200726/src/lib/dns.c:9435:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[INET6_ADDRSTRLEN + 1];
data/lua-cqueues-20200726/src/lib/dns.c:9448: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(&ss, &resconf()->nameserver[0], dns_sa_len(&resconf()->nameserver[0]));
data/lua-cqueues-20200726/src/lib/dns.c:9496:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.c:9603:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pretty[512];
data/lua-cqueues-20200726/src/lib/dns.h:422:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char data[1];
data/lua-cqueues-20200726/src/lib/dns.h:431:75:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define dns_p_new(n)		(dns_p_init((struct dns_packet *)&(union { unsigned char b[dns_p_calcsize((n))]; struct dns_packet p; }){ { 0 } }, dns_p_calcsize((n))))
data/lua-cqueues-20200726/src/lib/dns.h:617:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:636:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:655:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:674:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:675:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char rname[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:693:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:717:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char target[DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:752: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[DNS_OPT_MINDATA];
data/lua-cqueues-20200726/src/lib/dns.h:789:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char sha1[20];
data/lua-cqueues-20200726/src/lib/dns.h:812: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[DNS_TXT_MINDATA];
data/lua-cqueues-20200726/src/lib/dns.h:897:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char search[4][DNS_D_MAXNAME + 1];
data/lua-cqueues-20200726/src/lib/dns.h:900:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char lookup[4 * (1 + (4 * 2))];
data/lua-cqueues-20200726/src/lib/fifo.h:207:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char tmp[FIFO_TMPBUFSIZ];
data/lua-cqueues-20200726/src/lib/fifo.h:214: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(tmp, fifo->base, n);
data/lua-cqueues-20200726/src/lib/fifo.h:216: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(&fifo->base[m], tmp, n);
data/lua-cqueues-20200726/src/lib/fifo.h:444: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(iov.iov_base, p, n);
data/lua-cqueues-20200726/src/lib/fifo.h:461: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, iov.iov_base, n);
data/lua-cqueues-20200726/src/lib/kpoll.c:322:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[512];
data/lua-cqueues-20200726/src/lib/notify.c:148:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char *table[32] = {
data/lua-cqueues-20200726/src/lib/notify.c:294:20:  [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 (-1 == (wd = open(".", O_RDONLY|O_CLOEXEC)))
data/lua-cqueues-20200726/src/lib/notify.c:297:20:  [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 (-1 == (wd = open(".", O_RDONLY)))
data/lua-cqueues-20200726/src/lib/notify.c:304: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).
			error = (-1 == (fd = open(opts->path, flags, opts->mode)))? errno : 0;
data/lua-cqueues-20200726/src/lib/notify.c:315:20:  [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 (-1 == (fd = open(opts->abspath, flags, opts->mode)))
data/lua-cqueues-20200726/src/lib/notify.c:320:19:  [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 (-1 == (fd = open(opts->path, flags, opts->mode)))
data/lua-cqueues-20200726/src/lib/notify.c:463:32:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	struct file *key = &((union { char pad[offsetof(struct file, name) + NAME_MAX + 1]; struct file file; }){ { 0 } }).file;
data/lua-cqueues-20200726/src/lib/notify.c:468:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(key->name, name, namelen);
data/lua-cqueues-20200726/src/lib/notify.c:554: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(nfy->dirpath, dirpath, dirlen);
data/lua-cqueues-20200726/src/lib/notify.c:714:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define in_msgbuf(bufsiz) (&((union { char pad[bufsiz]; struct inotify_event event; }){ { 0 } }).event)
data/lua-cqueues-20200726/src/lib/notify.c:974: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(&nfy->dirpath[nfy->dirlen + 1], file->name, file->namelen);
data/lua-cqueues-20200726/src/lib/notify.c:1104: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(file->path, nfy->dirpath, nfy->dirlen);
data/lua-cqueues-20200726/src/lib/notify.c:1117: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(file->name, name, namelen);
data/lua-cqueues-20200726/src/lib/socket.c:277: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 ln[sizeof tmp];
data/lua-cqueues-20200726/src/lib/socket.c:286: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(ln, tmp, sizeof ln);
data/lua-cqueues-20200726/src/lib/socket.c:320:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char addr[64], who[256];
data/lua-cqueues-20200726/src/lib/socket.c:498:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 __thread char sslstr[256];
data/lua-cqueues-20200726/src/lib/socket.c:500:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 sslstr[256];
data/lua-cqueues-20200726/src/lib/socket.c:573:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char text[SA_ADDRSTRLEN];
data/lua-cqueues-20200726/src/lib/socket.c:596: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(text, any->sun.sun_path, SO_MIN(sizeof text - 1, sizeof any->sun.sun_path));
data/lua-cqueues-20200726/src/lib/socket.c:646: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(dst, fp, sa_len(fp));
data/lua-cqueues-20200726/src/lib/socket.c:707: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(&ss, sockaddr_ref(rmt).sa, sa_len(rmt));
data/lua-cqueues-20200726/src/lib/socket.c:726: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(lcl, &ss, sa_len(&ss));
data/lua-cqueues-20200726/src/lib/socket.c:1861: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((void *)so->opts.sa_bind, opts->sa_bind, len);
data/lua-cqueues-20200726/src/lib/socket.c:1999:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&host->ss, sa, SO_MIN(af_len(sa->sa_family), sizeof host->ss));
data/lua-cqueues-20200726/src/lib/socket.c:2220: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(so->bio.ahead.data, cfg->pushback.iov_base, cfg->pushback.iov_len);
data/lua-cqueues-20200726/src/lib/socket.c:2444: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, so->bio.ahead.p, count);
data/lua-cqueues-20200726/src/lib/socket.c:3142:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char arg0[64];
data/lua-cqueues-20200726/src/lib/socket.c:3145: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 scheme[32];
data/lua-cqueues-20200726/src/lib/socket.c:3146: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 authority[128];
data/lua-cqueues-20200726/src/lib/socket.c:3147:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char host[128];
data/lua-cqueues-20200726/src/lib/socket.c:3148:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char port[32];
data/lua-cqueues-20200726/src/lib/socket.c:3149: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 path[128];
data/lua-cqueues-20200726/src/lib/socket.c:3150: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 query[64];
data/lua-cqueues-20200726/src/lib/socket.c:3151: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 fragment[32];
data/lua-cqueues-20200726/src/lib/socket.c:3187:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char errstr[128];
data/lua-cqueues-20200726/src/lib/socket.c:3288: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 res[512];
data/lua-cqueues-20200726/src/lib/socket.c:3330:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char obuf[512], ibuf[512];
data/lua-cqueues-20200726/src/lib/socket.c:3454:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char addr[SA_ADDRSTRLEN];
data/lua-cqueues-20200726/src/lib/socket.c:3481:48:  [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).
			*sa_port(saddr, SA_PORT_NONE, NULL) = htons(atoi(argv[2]));
data/lua-cqueues-20200726/src/lib/socket.c:3493:48:  [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).
			*sa_port(saddr, SA_PORT_NONE, NULL) = htons(atoi(argv[2]));
data/lua-cqueues-20200726/src/lib/socket.h:326:77:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define SA_ADDR_NONE (&(union { struct in_addr addr; struct in6_addr addr6; char path[sizeof ((struct sockaddr_un *)0)->sun_path]; }))
data/lua-cqueues-20200726/src/lib/socket.h:595:27:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	.msg_control = &(union { char buf[64]; struct cmsghdr hdr; }){ { 0 } }, \
data/lua-cqueues-20200726/src/lib/socket.h:608: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), &fd, sizeof fd);
data/lua-cqueues-20200726/src/signal.c:93:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char *const table[32] = {
data/lua-cqueues-20200726/src/socket.c:546: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, init, len);
data/lua-cqueues-20200726/src/socket.c:620:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(((struct sockaddr_un*)sa)->sun_path, path, MIN(plen, sizeof(((struct sockaddr_un*)sa)->sun_path)));
data/lua-cqueues-20200726/src/socket.c:776: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 flag[8], *p = flag;
data/lua-cqueues-20200726/src/socket.c:971: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(sun.sun_path, path, MIN(plen, sizeof sun.sun_path));
data/lua-cqueues-20200726/src/socket.c:1059: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(sun.sun_path, path, MIN(plen, sizeof sun.sun_path));
data/lua-cqueues-20200726/src/socket.c:2229: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(iov.iov_base, src, len);
data/lua-cqueues-20200726/src/socket.c:2479: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(&fd, CMSG_DATA(cmsg), sizeof fd);
data/lua-cqueues-20200726/src/socket.c:2638:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mode[3], *p = mode;
data/lua-cqueues-20200726/src/socket.c:3154:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	struct iovec dst = { memcpy(lua_newuserdata(L, src.iov_len), src.iov_base, src.iov_len), src.iov_len };
data/lua-cqueues-20200726/src/socket.c:3167:23:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	struct iovec dst = { memcpy(lua_newuserdata(L, src.iov_len), src.iov_base, src.iov_len), src.iov_len };
data/lua-cqueues-20200726/util/tcp-urgent.c:180:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const struct { char text[16]; int flag; } event[] = {
data/lua-cqueues-20200726/util/tcp-urgent.c:335:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char text[128];
data/lua-cqueues-20200726/util/tcp-urgent.c:351:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char data[32], urgent[1];
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:403: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[512] = { 0 };
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:473:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buff[COMPAT53_LUA_FILE_BUFFER_SIZE];  /* area for reading file */
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:496: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[512] = {0};
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:570: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).
    lf.f = fopen(filename, "r"); /* default stdlib doesn't forcefully lock files here */
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:675: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(newptr, B->ptr, B->nelems);
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:686: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(luaL_prepbuffsize(B, l), s, l);
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:769:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(ptr, mptr, LUA_EXTRASPACE);
data/lua-cqueues-20200726/vendor/compat53/lprefix.h:62: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 buff[8] = { 0 };
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:135:7:  [2] (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, s, l * sizeof(char)); p += l;
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:137:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(p, sep, lsep * sizeof(char));
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:141: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(p, s, l * sizeof(char));  /* last copy (not followed by separator) */
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:916:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buff[10];
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:996: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(form, strfrmt, ((p - strfrmt) + 1) * sizeof(char));
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1030:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char form[MAX_FORMAT];  /* to store the format ('%...') */
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1146: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 buff[5 * sizeof(lua_Number)];  /* enough for any float type */
data/lua-cqueues-20200726/vendor/compat53/ltablib.c:263:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buff, &c, sof(c) * sizeof(unsigned int));
data/lua-cqueues-20200726/vendor/compat53/ltablib.c:264:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buff + sof(c), &t, sof(t) * sizeof(unsigned int));
data/lua-cqueues-20200726/vendor/compat53/tests/testmod.c:77: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(p, s, len > LUA_EXTRASPACE-1 ? LUA_EXTRASPACE-1 : len+1);
data/lua-cqueues-20200726/vendor/compat53/tests/testmod.c:302: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 filename[L_tmpnam+1] = { 0 };
data/lua-cqueues-20200726/vendor/compat53/tests/testmod.c:307:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE* f = fopen(filename, "wb");
data/lua-cqueues-20200726/src/cqueues.c:728:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (-1 == read(kp->alert.fd[0], &n, sizeof n)) {
data/lua-cqueues-20200726/src/cqueues.c:740:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if (-1 == (n = read(kp->alert.fd[0], buf, sizeof buf))) {
data/lua-cqueues-20200726/src/lib/dns.c:1356: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).
	return dns_b_put(b, src, strlen(src));
data/lua-cqueues-20200726/src/lib/dns.c:2025:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return dns_q_make2(Q, qname, strlen(qname), qtype, qclass, qflags);
data/lua-cqueues-20200726/src/lib/dns.c:3178: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 ((error = dns_d_push(P, mx->host, strlen(mx->host))))
data/lua-cqueues-20200726/src/lib/dns.c:3243: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 ((error = dns_d_push(P, ns->host, strlen(ns->host))))
data/lua-cqueues-20200726/src/lib/dns.c:3356:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((error = dns_d_push(P, dn[i], strlen(dn[i]))))
data/lua-cqueues-20200726/src/lib/dns.c:3506:78:  [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 (0 == (len = dns_d_comp(&P->data[P->end], P->size - P->end, srv->target, strlen(srv->target), P, &error)))
data/lua-cqueues-20200726/src/lib/dns.c:4224:24:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			while (EOF != (ch = fgetc(fp)) && ch != '\n') {
data/lua-cqueues-20200726/src/lib/dns.c:4296:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		for (i = strlen(addr); i < INET_ADDRSTRLEN; i++)
data/lua-cqueues-20200726/src/lib/dns.c:4316:50:  [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).
	dns_d_anchor(ent->host, sizeof ent->host, host, strlen(host));
data/lua-cqueues-20200726/src/lib/dns.c:4452: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(resconf->search[0]);
data/lua-cqueues-20200726/src/lib/dns.c:4684:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while (EOF != (ch = getc(fp)) && ch != '\n') {
data/lua-cqueues-20200726/src/lib/dns.c:4695:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					ch	= getc(fp);
data/lua-cqueues-20200726/src/lib/dns.c:4729:75:  [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).
				dns_d_anchor(resconf->search[j], sizeof resconf->search[j], words[i], strlen(words[i]));
data/lua-cqueues-20200726/src/lib/dns.c:4978:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ch = getc(fp);
data/lua-cqueues-20200726/src/lib/dns.c:4988:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (EOF != (ch = getc(fp))) {
data/lua-cqueues-20200726/src/lib/dns.c:5007:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (EOF != (ch = getc(fp))) {
data/lua-cqueues-20200726/src/lib/dns.c:5242:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(resconf->lookup, lookup, sizeof resconf->lookup);
data/lua-cqueues-20200726/src/lib/dns.c:5440: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 (!dns_d_isanchored(dn, strlen(dn)))
data/lua-cqueues-20200726/src/lib/dns.c:5928:51:  [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 ((error = dns_p_push(P, DNS_S_AUTHORITY, ".", strlen("."), DNS_T_NS, DNS_C_IN, 0, "hints.local.")))
data/lua-cqueues-20200726/src/lib/dns.c:5940:65:  [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 ((error = dns_p_push(P, DNS_S_ADDITIONAL, "hints.local.", strlen("hints.local."), rtype, DNS_C_IN, 0, dns_sa_addr(af, sa, NULL))))
data/lua-cqueues-20200726/src/lib/dns.c:7204:46:  [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 ((error = dns_p_push(P, DNS_S_QD, qname, strlen(qname), qtype, DNS_C_IN, 0, 0)))
data/lua-cqueues-20200726/src/lib/dns.c:7788:58:  [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 ((error = dns_p_push(F->answer, DNS_S_QD, R->qname, strlen(R->qname), R->qtype, R->qclass, 0, 0)))
data/lua-cqueues-20200726/src/lib/dns.c:7912:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return dns_res_submit2(R, qname, strlen(qname), qtype, qclass);
data/lua-cqueues-20200726/src/lib/dns.c:8262: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).
		clen	= strlen(cname);
data/lua-cqueues-20200726/src/lib/dns.c:8485:61:  [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 (!dns_d_cname(ai->cname, sizeof ai->cname, ai->g.name, strlen(ai->g.name), ai->glue, &error))
data/lua-cqueues-20200726/src/lib/dns.c:9195:28:  [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).
	} while (dns_d_cleave(dn, strlen(dn) + 1, dn, strlen(dn)));
data/lua-cqueues-20200726/src/lib/dns.c:9195: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).
	} while (dns_d_cleave(dn, strlen(dn) + 1, dn, strlen(dn)));
data/lua-cqueues-20200726/src/lib/dns.c:9205:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		dns_d_trim(name, sizeof name, *argv, strlen(*argv), DNS_D_ANCHOR);
data/lua-cqueues-20200726/src/lib/dns.c:9361:54:  [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).
	while (dns_resconf_search(name, sizeof name, qname, strlen(qname), resconf(), &i))
data/lua-cqueues-20200726/src/lib/dns.c:9458:51:  [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 ((error = dns_p_push(Q, DNS_S_QD, MAIN.qname, strlen(MAIN.qname), MAIN.qtype, DNS_C_IN, 0, 0)))
data/lua-cqueues-20200726/src/lib/dns.c:9531:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		if ((error = dns_p_push(query, DNS_S_QUESTION, who, strlen(who), DNS_T_A, DNS_C_IN, 0, 0)))
data/lua-cqueues-20200726/src/lib/dns.c:9778: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).
		max = DNS_PP_MAX(max, strlen(type[i].name));
data/lua-cqueues-20200726/src/lib/dns.c:9840: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(cmds[i].cmd) > m)
data/lua-cqueues-20200726/src/lib/dns.c:9841: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).
			m	= strlen(cmds[i].cmd);
data/lua-cqueues-20200726/src/lib/dns.c:9847:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		for (n = strlen(cmds[i].cmd); n < m; n++)
data/lua-cqueues-20200726/src/lib/dns.h:473: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).
#define dns_d_new2(a, f)	dns_d_new3((a), strlen((a)), (f))
data/lua-cqueues-20200726/src/lib/dns.h:474:40:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define dns_d_new1(a)		dns_d_new3((a), strlen((a)), DNS_D_ANCHOR)
data/lua-cqueues-20200726/src/lib/fifo.h:484:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	return fifo_write(fifo, src, strlen(src));
data/lua-cqueues-20200726/src/lib/fifo.h:692:22:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (EOF != (ch = getchar()))
data/lua-cqueues-20200726/src/lib/kpoll.c:324:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(kp->alert.fd[0], buf, sizeof buf) > 0)
data/lua-cqueues-20200726/src/lib/notify.c:533:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t dirlen = strlen(dirpath);
data/lua-cqueues-20200726/src/lib/notify.c:725:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((len = read(nfy->fd, buf, IN_BUFSIZ)) > 0) {
data/lua-cqueues-20200726/src/lib/notify.c:727: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).
			size_t namelen = strlen(msg->name);
data/lua-cqueues-20200726/src/lib/notify.c:1086:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t namelen = strlen(name);
data/lua-cqueues-20200726/src/lib/notify.c:1147:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t namelen = strlen(name);
data/lua-cqueues-20200726/src/lib/socket.c:832:16:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		char *path = strncpy((char [sizeof sockaddr_ref(arg).sun->sun_path + 1]){ 0 }, sockaddr_ref(arg).sun->sun_path, sizeof sockaddr_ref(arg).sun->sun_path);
data/lua-cqueues-20200726/src/lib/socket.c:847:19:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			mode_t omask = umask(opts->sun_mask & 0777);
data/lua-cqueues-20200726/src/lib/socket.c:849:4:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
			umask(omask);
data/lua-cqueues-20200726/src/lib/socket.c:2322:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(so->fd, dst, SO_MIN(lim, LONG_MAX));
data/lua-cqueues-20200726/src/lib/socket.c:2488:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(src);
data/lua-cqueues-20200726/src/signal.c:250:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if ((n = read(S->fd, &info, sizeof info)) > 0) {
data/lua-cqueues-20200726/src/thread.c:713:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (0 == read(ct->pipe[0], &(char){ 0 }, 1)) {
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:510:9:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = getc(lf->f);
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:515:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return getc(lf->f);  /* return next character */
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:530:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = getc(lf->f);
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.c:532:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    *cp = getc(lf->f);  /* skip end-of-line, if present */
data/lua-cqueues-20200726/vendor/compat53/c-api/compat-5.3.h:254: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).
  luaL_addlstring((B), (s), strlen((s)))
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:585:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    upto += strlen(p + upto) + 1;  /* may have more after \0 */
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1007: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).
  size_t l = strlen(form);
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1008:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  size_t lm = strlen(lenmod);
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1070:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            luaL_argcheck(L, l == strlen(s), arg, "string contains zeros");
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1400: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).
        luaL_argcheck(L, strlen(s) == len, arg, "string contains zeros");
data/lua-cqueues-20200726/vendor/compat53/lstrlib.c:1524: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).
        size_t len = (int)strlen(data + pos);

ANALYSIS SUMMARY:

Hits = 327
Lines analyzed = 34324 in approximately 0.81 seconds (42597 lines/second)
Physical Source Lines of Code (SLOC) = 23637
Hits@level = [0] 118 [1]  65 [2] 230 [3]   8 [4]  17 [5]   7
Hits@level+ = [0+] 445 [1+] 327 [2+] 262 [3+]  32 [4+]  24 [5+]   7
Hits/KSLOC@level+ = [0+] 18.8264 [1+] 13.8342 [2+] 11.0843 [3+] 1.35381 [4+] 1.01536 [5+] 0.296146
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.