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/resolv-wrapper-1.1.7/src/resolv_wrapper.c
Examining data/resolv-wrapper-1.1.7/tests/test_res_init.c
Examining data/resolv-wrapper-1.1.7/tests/torture.c
Examining data/resolv-wrapper-1.1.7/tests/test_dns_fake.c
Examining data/resolv-wrapper-1.1.7/tests/test_res_query_search.c
Examining data/resolv-wrapper-1.1.7/tests/torture.h
Examining data/resolv-wrapper-1.1.7/tests/dns_srv.c
Examining data/resolv-wrapper-1.1.7/tests/test_real_res_query.c

FINAL RESULTS:

data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:127:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(buffer, sizeof(buffer), format, va);
data/resolv-wrapper-1.1.7/tests/torture.c:213:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	rc = system(start_dns_srv);
data/resolv-wrapper-1.1.7/tests/torture.c:265:8:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		rc = system(remove_cmd);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:117:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	d = getenv("RESOLV_WRAPPER_DEBUGLEVEL");
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1398:28:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *env_preload = getenv("LD_PRELOAD");
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1399:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *env_deepbind = getenv("RESOLV_WRAPPER_DISABLE_DEEPBIND");
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1953:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *resolv_conf = getenv("RESOLV_WRAPPER_CONF");
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:2052: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.
	fake_hosts = getenv("RESOLV_WRAPPER_HOSTS");
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:2149: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.
	fake_hosts = getenv("RESOLV_WRAPPER_HOSTS");
data/resolv-wrapper-1.1.7/tests/dns_srv.c:231:10:  [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.
			val = getenv("RWRAP_TEST_A_REC");
data/resolv-wrapper-1.1.7/tests/dns_srv.c:575:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, "Db:p:",
data/resolv-wrapper-1.1.7/tests/torture.c:68:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *ip4 = getenv("TORTURE_SERVER_ADDRESS_IPV4");
data/resolv-wrapper-1.1.7/tests/torture.c:78:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		const char *ip6 = getenv("TORTURE_SERVER_ADDRESS_IPV6");
data/resolv-wrapper-1.1.7/tests/torture.c:96:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *env = getenv("TORTURE_SERVER_PORT");
data/resolv-wrapper-1.1.7/tests/torture.c:256:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *env = getenv("TORTURE_SKIP_CLEANUP");
data/resolv-wrapper-1.1.7/tests/torture.c:336:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(NULL));
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:110:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buffer[1024];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:119:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		lvl = atoi(d);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:198:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:204: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 uri[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:213:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char nameserver[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:214: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 mailbox[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:224: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 cname_rec[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:225: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 ptr_rec[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:226: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 txt_rec[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:229: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 key[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:255: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:273:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:281: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->rrdata.srv_rec.hostname, value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:282: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:309:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		rr->rrdata.srv_rec.prio = atoi(str_prio);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:314: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).
		rr->rrdata.srv_rec.weight = atoi(str_weight);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:318:28:  [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).
	rr->rrdata.srv_rec.port = atoi(str_port);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:319: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->rrdata.srv_rec.hostname , hostname, strlen(hostname) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:321: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:346:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		rr->rrdata.uri_rec.prio = atoi(str_prio);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:351: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).
		rr->rrdata.uri_rec.weight = atoi(str_weight);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:355: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->rrdata.uri_rec.uri, uri, strlen(uri) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:357: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:366:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(rr->rrdata.txt_rec, value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:368: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:403: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->rrdata.soa_rec.nameserver, nameserver, strlen(nameserver)+1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:404: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->rrdata.soa_rec.mailbox, mailbox, strlen(mailbox)+1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:406:30:  [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).
	rr->rrdata.soa_rec.serial = atoi(str_serial);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:407: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).
	rr->rrdata.soa_rec.refresh = atoi(str_refresh);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:408:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	rr->rrdata.soa_rec.retry = atoi(str_retry);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:409:30:  [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).
	rr->rrdata.soa_rec.expire = atoi(str_expire);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:410: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).
	rr->rrdata.soa_rec.minimum = atoi(str_minimum);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:412: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:421: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->rrdata.cname_rec , value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:422: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:431: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->rrdata.ptr_rec , value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:432: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->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:555:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, &rr->rrdata.a_rec, sizeof(struct in_addr));
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:579:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, &rr->rrdata.aaaa_rec, sizeof(struct in6_addr));
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:591: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 hostname_compressed[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:619:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, hostname_compressed, compressed_len);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:631: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 hostname_compressed[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:659:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, hostname_compressed, compressed_len);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:690:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, rr->rrdata.uri_rec.uri, uri_len);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:718:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, rr->rrdata.txt_rec, txt_len);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:730: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 nameser_compressed[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:732: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 mailbox_compressed[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:764:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, nameser_compressed, compressed_ns_len);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:766:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, mailbox_compressed, compressed_mb_len);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:783: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 hostname_compressed[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:806:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, hostname_compressed, rdata_size);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:818: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 hostname_compressed[MAXDNAME];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:840:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(a, hostname_compressed, rdata_size);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:909: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[BUFSIZ];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:924:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(hostfile, "r");
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1028: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(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1425:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char soname[256] = {0};
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1450:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				char soname[256] = {0};
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1696:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char ip[INET6_ADDRSTRLEN];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1839: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[BUFSIZ];
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1845:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(resolv_conf, "r");
data/resolv-wrapper-1.1.7/tests/dns_srv.c:252: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, &a_rec, sizeof(struct in_addr));
data/resolv-wrapper-1.1.7/tests/dns_srv.c:372: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[BUFSIZE];
data/resolv-wrapper-1.1.7/tests/dns_srv.c:416: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 pid_str[32] = { 0 };
data/resolv-wrapper-1.1.7/tests/dns_srv.c:420:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_RDONLY, 0644);
data/resolv-wrapper-1.1.7/tests/dns_srv.c:429:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(path, O_CREAT | O_WRONLY | O_EXCL, 0644);
data/resolv-wrapper-1.1.7/tests/dns_srv.c:484:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fd = open("/dev/null", O_RDWR, 0);
data/resolv-wrapper-1.1.7/tests/dns_srv.c:486:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
			fd = open("/dev/null", O_WRONLY, 0);
data/resolv-wrapper-1.1.7/tests/dns_srv.c:512: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 svc[6];
data/resolv-wrapper-1.1.7/tests/dns_srv.c:591: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).
			opts.port = atoi(optarg);
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:58: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:59: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];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:91: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:92: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];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:126: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:127: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];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:161: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:184: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:185: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/resolv-wrapper-1.1.7/tests/test_dns_fake.c:217:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:240: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:247:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:298: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:305:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:306: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];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:360: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:429: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:471: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:475: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 nameser[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:476: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 admin[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:540: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:544: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[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:545: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];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:610: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:614: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[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:615: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];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:679: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:681: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 ptrname[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_dns_fake.c:722: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_real_res_query.c:101: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 answer[ANSIZE] = { 0 };
data/resolv-wrapper-1.1.7/tests/test_real_res_query.c:102: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];
data/resolv-wrapper-1.1.7/tests/test_real_res_query.c:137: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 answer[ANSIZE] = { 0 };
data/resolv-wrapper-1.1.7/tests/test_real_res_query.c:138: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];
data/resolv-wrapper-1.1.7/tests/test_real_res_query.c:173: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 answer[ANSIZE] = { 0 };
data/resolv-wrapper-1.1.7/tests/test_real_res_query.c:180:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[MAXDNAME];
data/resolv-wrapper-1.1.7/tests/test_res_init.c:38:22:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	test_state->rc_fd = mkstemp(test_state->resolv_conf_path);
data/resolv-wrapper-1.1.7/tests/test_res_init.c:96: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 straddr[INET6_ADDRSTRLEN] = { '\0' };
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:73: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:74: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];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:108: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:109: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];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:140: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:141: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];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:174: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 answer[ANSIZE];
data/resolv-wrapper-1.1.7/tests/test_res_query_search.c:175:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char addr[INET_ADDRSTRLEN];
data/resolv-wrapper-1.1.7/tests/torture.c:99:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		int port = atoi(env);
data/resolv-wrapper-1.1.7/tests/torture.c:165:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	rc_fd = mkstemp(path);
data/resolv-wrapper-1.1.7/tests/torture.c:195:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char start_dns_srv[1024] = {0};
data/resolv-wrapper-1.1.7/tests/torture.c:198: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.
	const char *nameservers[1] = {
data/resolv-wrapper-1.1.7/tests/torture.c:257:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char remove_cmd[1024] = {0};
data/resolv-wrapper-1.1.7/tests/torture.c:280: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[8] = {0};
data/resolv-wrapper-1.1.7/tests/torture.c:289:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open(s->srv_pidfile, O_RDONLY);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:255:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:273:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:281:45:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->rrdata.srv_rec.hostname, value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:282:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:319:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->rrdata.srv_rec.hostname , hostname, strlen(hostname) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:321:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:355:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->rrdata.uri_rec.uri, uri, strlen(uri) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:357:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:366:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->rrdata.txt_rec, value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:368:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:403:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->rrdata.soa_rec.nameserver, nameserver, strlen(nameserver)+1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:404: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).
	memcpy(rr->rrdata.soa_rec.mailbox, mailbox, strlen(mailbox)+1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:412:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:421: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).
	memcpy(rr->rrdata.cname_rec , value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:422:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:431: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).
	memcpy(rr->rrdata.ptr_rec , value, strlen(value) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:432:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:679: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).
	uri_len = strlen(rr->rrdata.uri_rec.uri) + 1;
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:709: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).
	txt_len = strlen(rr->rrdata.txt_rec) + 1;
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1028:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		memcpy(rr->key, key, strlen(key) + 1);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1247:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t qlen = strlen(query);
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1403:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (env_preload != NULL && strlen(env_preload) < 1024) {
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1410:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (env_deepbind != NULL && strlen(env_deepbind) >= 1) {
data/resolv-wrapper-1.1.7/src/resolv_wrapper.c:1867: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).
			p = buf + strlen("nameserver");
data/resolv-wrapper-1.1.7/tests/dns_srv.c:436: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(pid_str);
data/resolv-wrapper-1.1.7/tests/dns_srv.c:500:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(0177);
data/resolv-wrapper-1.1.7/tests/torture.c:98:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (env != NULL && env[0] != '\0' && strlen(env) < 6) {
data/resolv-wrapper-1.1.7/tests/torture.c:125:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(p) + 1 + strlen(TORTURE_PCAP_FILE) + 1;
data/resolv-wrapper-1.1.7/tests/torture.c:125:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(p) + 1 + strlen(TORTURE_PCAP_FILE) + 1;
data/resolv-wrapper-1.1.7/tests/torture.c:133:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(p) + 1 + strlen(TORTURE_DNS_SRV_PIDFILE) + 1;
data/resolv-wrapper-1.1.7/tests/torture.c:133:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(p) + 1 + strlen(TORTURE_DNS_SRV_PIDFILE) + 1;
data/resolv-wrapper-1.1.7/tests/torture.c:226:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(200 * 1000);
data/resolv-wrapper-1.1.7/tests/torture.c:294:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rc = read(fd, buf, sizeof(buf));
data/resolv-wrapper-1.1.7/tests/torture.c:313:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(200);

ANALYSIS SUMMARY:

Hits = 172
Lines analyzed = 4789 in approximately 0.13 seconds (37667 lines/second)
Physical Source Lines of Code (SLOC) = 3535
Hits@level = [0]  34 [1]  34 [2] 122 [3]  13 [4]   3 [5]   0
Hits@level+ = [0+] 206 [1+] 172 [2+] 138 [3+]  16 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 58.2744 [1+] 48.6563 [2+] 39.0382 [3+] 4.52617 [4+] 0.848656 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.