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/ldns-1.7.1/sha2.c
Examining data/ldns-1.7.1/buffer.c
Examining data/ldns-1.7.1/rdata.c
Examining data/ldns-1.7.1/tsig.c
Examining data/ldns-1.7.1/compat/gmtime_r.c
Examining data/ldns-1.7.1/compat/b64_ntop.c
Examining data/ldns-1.7.1/compat/fake-rfc2553.h
Examining data/ldns-1.7.1/compat/memmove.c
Examining data/ldns-1.7.1/compat/inet_ntop.c
Examining data/ldns-1.7.1/compat/calloc.c
Examining data/ldns-1.7.1/compat/realloc.c
Examining data/ldns-1.7.1/compat/b64_pton.c
Examining data/ldns-1.7.1/compat/ctime_r.c
Examining data/ldns-1.7.1/compat/fake-rfc2553.c
Examining data/ldns-1.7.1/compat/timegm.c
Examining data/ldns-1.7.1/compat/malloc.c
Examining data/ldns-1.7.1/compat/snprintf.c
Examining data/ldns-1.7.1/compat/isblank.c
Examining data/ldns-1.7.1/compat/inet_pton.c
Examining data/ldns-1.7.1/compat/strlcpy.c
Examining data/ldns-1.7.1/compat/inet_aton.c
Examining data/ldns-1.7.1/compat/isascii.c
Examining data/ldns-1.7.1/compat/localtime_r.c
Examining data/ldns-1.7.1/dnssec_verify.c
Examining data/ldns-1.7.1/wire2host.c
Examining data/ldns-1.7.1/higher.c
Examining data/ldns-1.7.1/sha1.c
Examining data/ldns-1.7.1/dane.c
Examining data/ldns-1.7.1/update.c
Examining data/ldns-1.7.1/dnssec_zone.c
Examining data/ldns-1.7.1/util.c
Examining data/ldns-1.7.1/rbtree.c
Examining data/ldns-1.7.1/resolver.c
Examining data/ldns-1.7.1/keys.c
Examining data/ldns-1.7.1/net.c
Examining data/ldns-1.7.1/ldns/duration.h
Examining data/ldns-1.7.1/ldns/sha2.h
Examining data/ldns-1.7.1/ldns/rbtree.h
Examining data/ldns-1.7.1/ldns/dnssec_verify.h
Examining data/ldns-1.7.1/ldns/str2host.h
Examining data/ldns-1.7.1/ldns/rdata.h
Examining data/ldns-1.7.1/ldns/higher.h
Examining data/ldns-1.7.1/ldns/update.h
Examining data/ldns-1.7.1/ldns/tsig.h
Examining data/ldns-1.7.1/ldns/dane.h
Examining data/ldns-1.7.1/ldns/sha1.h
Examining data/ldns-1.7.1/ldns/rr_functions.h
Examining data/ldns-1.7.1/ldns/dnssec_zone.h
Examining data/ldns-1.7.1/ldns/host2str.h
Examining data/ldns-1.7.1/ldns/buffer.h
Examining data/ldns-1.7.1/ldns/wire2host.h
Examining data/ldns-1.7.1/ldns/keys.h
Examining data/ldns-1.7.1/ldns/ldns.h
Examining data/ldns-1.7.1/ldns/host2wire.h
Examining data/ldns-1.7.1/ldns/dnssec_sign.h
Examining data/ldns-1.7.1/ldns/radix.h
Examining data/ldns-1.7.1/ldns/resolver.h
Examining data/ldns-1.7.1/ldns/dnssec.h
Examining data/ldns-1.7.1/ldns/error.h
Examining data/ldns-1.7.1/ldns/parse.h
Examining data/ldns-1.7.1/ldns/dname.h
Examining data/ldns-1.7.1/ldns/zone.h
Examining data/ldns-1.7.1/ldns/packet.h
Examining data/ldns-1.7.1/ldns/rr.h
Examining data/ldns-1.7.1/packet.c
Examining data/ldns-1.7.1/host2str.c
Examining data/ldns-1.7.1/radix.c
Examining data/ldns-1.7.1/examples/ldns-signzone.c
Examining data/ldns-1.7.1/examples/ldns-read-zone.c
Examining data/ldns-1.7.1/examples/ldns-key2ds.c
Examining data/ldns-1.7.1/examples/ldns-resolver.c
Examining data/ldns-1.7.1/examples/ldns-update.c
Examining data/ldns-1.7.1/examples/ldns-notify.c
Examining data/ldns-1.7.1/examples/ldns-nsec3-hash.c
Examining data/ldns-1.7.1/examples/ldns-keyfetcher.c
Examining data/ldns-1.7.1/examples/ldns-testpkts.c
Examining data/ldns-1.7.1/examples/ldns-dpa.c
Examining data/ldns-1.7.1/examples/ldnsd.c
Examining data/ldns-1.7.1/examples/ldns-keygen.c
Examining data/ldns-1.7.1/examples/ldns-gen-zone.c
Examining data/ldns-1.7.1/examples/ldns-test-edns.c
Examining data/ldns-1.7.1/examples/ldns-rrsig.c
Examining data/ldns-1.7.1/examples/ldns-verify-zone.c
Examining data/ldns-1.7.1/examples/ldns-zcat.c
Examining data/ldns-1.7.1/examples/ldns-compare-zones.c
Examining data/ldns-1.7.1/examples/fake-rfc2553.h
Examining data/ldns-1.7.1/examples/ldns-walk.c
Examining data/ldns-1.7.1/examples/ldns-mx.c
Examining data/ldns-1.7.1/examples/ldns-revoke.c
Examining data/ldns-1.7.1/examples/ldns-zsplit.c
Examining data/ldns-1.7.1/examples/ldns-dane.c
Parsing failed to find end of parameter list; semicolon terminated it in ("\n   or: %s [OPTIONS] create <name> <port> [<usage> "
#else
	printf("Usage: %s [OPTIONS] create <name> <port> [<usage> "
#endif
			"[<selector> [<type>]]]\n", progname);
	printf("\n\tUse the TLS con
Examining data/ldns-1.7.1/examples/ldns-testpkts.h
Examining data/ldns-1.7.1/examples/ldns-version.c
Examining data/ldns-1.7.1/examples/ldns-chaos.c
Examining data/ldns-1.7.1/examples/ldns-dpa.h
Examining data/ldns-1.7.1/examples/ldns-testns.c
Examining data/ldns-1.7.1/dnssec_sign.c
Examining data/ldns-1.7.1/error.c
Examining data/ldns-1.7.1/rr.c
Examining data/ldns-1.7.1/parse.c
Examining data/ldns-1.7.1/str2host.c
Examining data/ldns-1.7.1/dnssec.c
Examining data/ldns-1.7.1/duration.c
Examining data/ldns-1.7.1/host2wire.c
Examining data/ldns-1.7.1/linktest.c
Examining data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h
Examining data/ldns-1.7.1/rr_functions.c
Examining data/ldns-1.7.1/zone.c
Examining data/ldns-1.7.1/drill/work.c
Examining data/ldns-1.7.1/drill/securetrace.c
Examining data/ldns-1.7.1/drill/drill_util.h
Examining data/ldns-1.7.1/drill/drill.h
Examining data/ldns-1.7.1/drill/dnssec.c
Examining data/ldns-1.7.1/drill/chasetrace.c
Examining data/ldns-1.7.1/drill/root.c
Examining data/ldns-1.7.1/drill/drill.c
Examining data/ldns-1.7.1/drill/drill_util.c
Examining data/ldns-1.7.1/drill/error.c
Examining data/ldns-1.7.1/dname.c

FINAL RESULTS:

data/ldns-1.7.1/buffer.c:111:13:  [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.
		written = vsnprintf((char *) ldns_buffer_current(buffer), remaining,
data/ldns-1.7.1/buffer.c:123:14:  [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.
			written = vsnprintf((char *) ldns_buffer_current(buffer),
data/ldns-1.7.1/compat/ctime_r.c:14: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(buf, result);
data/ldns-1.7.1/compat/inet_ntop.c:97:6:  [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.
	l = snprintf(tmp, size, fmt, src[0], src[1], src[2], src[3]);
data/ldns-1.7.1/compat/snprintf.c:49:9:  [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 snprintf my_snprintf
data/ldns-1.7.1/compat/snprintf.c:50:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define vsnprintf my_vsnprintf
data/ldns-1.7.1/compat/snprintf.c:53:5:  [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.
int snprintf(char* str, size_t size, const char* format, ...);
data/ldns-1.7.1/compat/snprintf.c:54:5:  [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.
int vsnprintf(char* str, size_t size, const char* format, va_list arg);
data/ldns-1.7.1/compat/snprintf.c:66:5:  [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.
int snprintf(char* str, size_t size, const char* format, ...)
data/ldns-1.7.1/compat/snprintf.c:71:6:  [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.
	r = vsnprintf(str, size, format, args);
data/ldns-1.7.1/compat/snprintf.c:629:5:  [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.
int vsnprintf(char* str, size_t size, const char* format, va_list arg)
data/ldns-1.7.1/compat/snprintf.c:836:8:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#undef snprintf
data/ldns-1.7.1/compat/snprintf.c:847:4:  [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.
	r=snprintf(buf, sizeof(buf), __VA_ARGS__); \
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6695:14:  [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.
    retval = vsnprintf(buffer, len, format, ap);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6697:14:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    retval = vsprintf(buffer, format, ap);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6726:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buffer, pat, args);
data/ldns-1.7.1/drill/error.c:20:9:  [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, args);
data/ldns-1.7.1/drill/error.c:37:9:  [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, args);
data/ldns-1.7.1/drill/error.c:54:9:  [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(stdout, fmt, args);
data/ldns-1.7.1/examples/ldns-dane.c:69:2:  [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.
	printf("\n   or: %s [OPTIONS] create <name> <port> [<usage> "
data/ldns-1.7.1/examples/ldns-testns.c:175:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(logfile, msg, args);
data/ldns-1.7.1/examples/ldns-testns.c:185:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(logfile, msg, args);
data/ldns-1.7.1/examples/ldns-testns.c:192:57:  [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.
void verbose(int lvl, const char* msg, ...) ATTR_FORMAT(printf, 2, 3);
data/ldns-1.7.1/examples/ldns-testns.c:198: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(logfile, msg, args);
data/ldns-1.7.1/examples/ldns-testpkts.c:35:57:  [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.
void verbose(int lvl, const char* msg, ...) ATTR_FORMAT(printf, 2, 3);
data/ldns-1.7.1/examples/ldns-testpkts.c:44: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, msg, args);
data/ldns-1.7.1/compat/timegm.c:18:7:  [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.
	tz = getenv("TZ");
data/ldns-1.7.1/drill/drill.c:211:14:  [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 ((c = getopt(argc, argv, "46ab:c:d:Df:hi:I:k:o:p:q:Qr:sStTuvV:w:xy:z")) != -1) {
data/ldns-1.7.1/examples/ldns-compare-zones.c:67:14:  [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 ((c = getopt(argc, argv, "ahvdicuUesz")) != -1) {
data/ldns-1.7.1/examples/ldns-dane.c:1253:13:  [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((c = getopt(argc, argv, "46a:bc:df:hik:no:p:r:sSt:TuvV:")) != -1){
data/ldns-1.7.1/examples/ldns-dpa.h:70:9:  [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 random rand
data/ldns-1.7.1/examples/ldns-dpa.h:75:9:  [3] (random) srandom:
  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 srandom srand
data/ldns-1.7.1/examples/ldns-dpa.h:75:17:  [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.
#define srandom srand
data/ldns-1.7.1/examples/ldns-gen-zone.c:110:9:  [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((unsigned int)time(NULL));
data/ldns-1.7.1/examples/ldns-gen-zone.c:115: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 ((c = getopt(argc, argv, "a:p:shvo:")) != -1) {
data/ldns-1.7.1/examples/ldns-keygen.c:64:8:  [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.
	FILE *random;
data/ldns-1.7.1/examples/ldns-keygen.c:79:14:  [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 ((c = getopt(argc, argv, "a:kb:r:v")) != -1) {
data/ldns-1.7.1/examples/ldns-keygen.c:110:9:  [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.
			if (!random) {
data/ldns-1.7.1/examples/ldns-keygen.c:234:7:  [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.
	if (!random) {
data/ldns-1.7.1/examples/ldns-keygen.c:236:8:  [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.
		if (!random) {
data/ldns-1.7.1/examples/ldns-keygen.c:242:25:  [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.
	(void)ldns_init_random(random, (unsigned int) bits/8);
data/ldns-1.7.1/examples/ldns-keygen.c:243:9:  [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.
	fclose(random);
data/ldns-1.7.1/examples/ldns-notify.c:191:2:  [3] (random) srandom:
  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.
	srandom(time(NULL) ^ getpid());
data/ldns-1.7.1/examples/ldns-notify.c:193: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 ((c = getopt(argc, argv, "vhdp:r:s:y:z:I:")) != -1) {
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:49:14:  [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 ((c = getopt(argc, argv, "a:s:t:")) != -1) {
data/ldns-1.7.1/examples/ldns-read-zone.c:134: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 ((c = getopt(argc, argv, "0bcde:E:hnpsS:u:U:vz")) != -1) {
data/ldns-1.7.1/examples/ldns-signzone.c:606:14:  [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 ((c = getopt(argc, argv, "a:bde:f:i:k:no:ps:t:uvAUE:K:")) != -1) {
data/ldns-1.7.1/examples/ldns-testns.c:459:2:  [3] (random) srandom:
  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.
	srandom(time(NULL) ^ getpid());
data/ldns-1.7.1/examples/ldns-testns.c:463:13:  [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((c = getopt(argc, argv, "6f:p:rv")) != -1) {
data/ldns-1.7.1/examples/ldns-testns.c:538:12:  [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.
			port = (random() % 64510) + 1025;
data/ldns-1.7.1/examples/ldns-verify-zone.c:687:13:  [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.
			    || ((random() % 100) >= 100 - percentage)) {
data/ldns-1.7.1/examples/ldns-verify-zone.c:764:14:  [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 ((c = getopt(argc, argv, "ae:hi:k:vV:p:St:")) != -1) {
data/ldns-1.7.1/examples/ldns-verify-zone.c:831:25:  [3] (random) srandom:
  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.
                        srandom(time(NULL) ^ getpid());
data/ldns-1.7.1/examples/ldns-zcat.c:57:14:  [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 ((c = getopt(argc, argv, "o:v")) != -1) {
data/ldns-1.7.1/examples/ldns-zsplit.c:135:14:  [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 ((c = getopt(argc, argv, "n:o:zv")) != -1) {
data/ldns-1.7.1/keys.c:1209:10:  [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.
			  i = random();
data/ldns-1.7.1/keys.c:1214:10:  [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.
			  i = random();
data/ldns-1.7.1/util.c:383:3:  [3] (random) srandom:
  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.
		srandom(seed_i);
data/ldns-1.7.1/util.c:405:34:  [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.
                rid = (uint16_t) random();
data/ldns-1.7.1/util.c:408:26:  [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.
        rid = (uint16_t) random();
data/ldns-1.7.1/buffer.c:53: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(buffer->_data, data, size);
data/ldns-1.7.1/compat/fake-rfc2553.c:53: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 tmpserv[16];
data/ldns-1.7.1/compat/fake-rfc2553.h:60: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		__ss_pad2[_SS_PADSIZE];
data/ldns-1.7.1/compat/inet_ntop.c:94: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[sizeof "255.255.255.255"];
data/ldns-1.7.1/compat/inet_ntop.c:122:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
data/ldns-1.7.1/compat/inet_pton.c:130: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, tmp, NS_INADDRSZ);
data/ldns-1.7.1/compat/inet_pton.c:228: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, tmp, NS_IN6ADDRSZ);
data/ldns-1.7.1/compat/memmove.c:41:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dest, src, n);
data/ldns-1.7.1/compat/snprintf.c:299: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:314: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:329: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:344: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:358: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:372: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:386: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:400: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:414: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:428: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[PRINT_DEC_BUFSZ];
data/ldns-1.7.1/compat/snprintf.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 buf[PRINT_FLOAT_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:557: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[PRINT_FLOAT_BUFSZ];
data/ldns-1.7.1/compat/snprintf.c:838: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[bufsz]; \
data/ldns-1.7.1/compat/timegm.c:23: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[256];
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:3667:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6550: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.
		&& (xdigit = strchr((char *) PL_hexdigit, s[1])))
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6772: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(dst + used, src, copy);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6801: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(dst, src, copy);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6893: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 octbuf[32] = "%123456789ABCDF";
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6963: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 tmp[2];
data/ldns-1.7.1/dane.c:36: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[LDNS_MAX_DOMAINLEN];
data/ldns-1.7.1/dane.c:65:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + s, ldns_rdf_data(name), ldns_rdf_size(name));
data/ldns-1.7.1/dname.c:80:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, ldns_rdf_data(rd1), left_size);
data/ldns-1.7.1/dname.c:81:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf + left_size, ldns_rdf_data(rd2), ldns_rdf_size(rd2));
data/ldns-1.7.1/dname.c:116:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ldns_rdf_data(rd1) + left_size, ldns_rdf_data(rd2),
data/ldns-1.7.1/dname.c:153:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&buf[rd_size - src_pos - len - 1],
data/ldns-1.7.1/dname.c:585: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(data, ldns_rdf_data(rdf) + src_pos, len + 1);
data/ldns-1.7.1/dnssec.c:1021: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 hash[LDNS_SHA1_DIGEST_LENGTH];
data/ldns-1.7.1/dnssec.c:1045: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(hashed_owner_str, ldns_rdf_data(cann), ldns_rdf_size(cann));
data/ldns-1.7.1/dnssec.c:1046: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(hashed_owner_str + ldns_rdf_size(cann), salt, salt_length);
data/ldns-1.7.1/dnssec.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(hashed_owner_str, hash, LDNS_SHA1_DIGEST_LENGTH);
data/ldns-1.7.1/dnssec.c:1060: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(hashed_owner_str + LDNS_SHA1_DIGEST_LENGTH, salt, salt_length);
data/ldns-1.7.1/dnssec.c:1140: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(salt_data + 1, salt, salt_length);
data/ldns-1.7.1/dnssec.c:1337: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(salt, &ldns_rdf_data(salt_rdf)[1], salt_length);
data/ldns-1.7.1/dnssec_verify.c:1819: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 encoded[37+64];
data/ldns-1.7.1/dnssec_verify.c:1937: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[256+2]; /* sufficient for 2*384/8+1 */
data/ldns-1.7.1/drill/drill.c:168: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            ip6_arpa_str[74];
data/ldns-1.7.1/drill/drill.c:170: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            in_addr_arpa_str[40];
data/ldns-1.7.1/drill/drill.c:247:17:  [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).
				verbosity = atoi(optarg);
data/ldns-1.7.1/drill/drill.c:282:22:  [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).
				qbuf = (uint16_t)atoi(optarg);
data/ldns-1.7.1/drill/drill.c:347:23:  [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).
				qport = (uint16_t)atoi(optarg);
data/ldns-1.7.1/drill/drill_util.c:43: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[LDNS_MAX_LINELEN];
data/ldns-1.7.1/drill/drill_util.c:48: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).
	input_file = fopen(filename, "r");
data/ldns-1.7.1/drill/root.c:87: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(filename, "r");
data/ldns-1.7.1/drill/work.c:86:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/ldns-1.7.1/drill/work.c:159: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(wire, hexbuf, (size_t) hexbufpos);
data/ldns-1.7.1/drill/work.c:226: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(filename, "w");
data/ldns-1.7.1/duration.c:140:36:  [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).
        duration->years = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:146:37:  [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).
        duration->months = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:152:35:  [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).
        duration->days = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:162:36:  [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).
        duration->hours = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:168:38:  [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).
        duration->minutes = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:174:38:  [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).
        duration->seconds = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:185:40:  [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).
            duration->weeks = (time_t) atoi(str+1);
data/ldns-1.7.1/duration.c:223: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 num[sizeof(unsigned int) + 2];
data/ldns-1.7.1/examples/fake-rfc2553.h:56: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		__ss_pad2[_SS_PADSIZE];
data/ldns-1.7.1/examples/ldns-compare-zones.c:126:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp1 = fopen(fn1, "r");
data/ldns-1.7.1/examples/ldns-compare-zones.c:145:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp2 = fopen(fn2, "r");
data/ldns-1.7.1/examples/ldns-dane.c:337: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[BUFSIZE];
data/ldns-1.7.1/examples/ldns-dane.c:562: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(filename, "r"))) {
data/ldns-1.7.1/examples/ldns-dane.c:811:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/ldns-1.7.1/examples/ldns-dane.c:1344:13:  [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).
			offset = atoi(optarg); /* todo check if all numeric */
data/ldns-1.7.1/examples/ldns-dpa.c:356: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).
					value = atoi(mc->value);
data/ldns-1.7.1/examples/ldns-dpa.c:365: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).
					value = atoi(mc->value);
data/ldns-1.7.1/examples/ldns-dpa.c:375:31:  [2] (integer) atol:
  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).
					time.tv_sec = (long int) atol(mc->value);
data/ldns-1.7.1/examples/ldns-dpa.c:527:21:  [2] (integer) atol:
  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).
		result = (size_t) atol(counters->match->match->value) * counters->match->count;
data/ldns-1.7.1/examples/ldns-dpa.c:559:34:  [2] (integer) atol:
  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).
			result += (size_t) abs((int) (atol(counters->match->match->value) - atol(counters->left->match->match->value))) - 1;
data/ldns-1.7.1/examples/ldns-dpa.c:559:72:  [2] (integer) atol:
  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).
			result += (size_t) abs((int) (atol(counters->match->match->value) - atol(counters->left->match->match->value))) - 1;
data/ldns-1.7.1/examples/ldns-dpa.c:565:34:  [2] (integer) atol:
  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).
			result += (size_t) abs((int) (atol(counters->right->match->match->value) - atol(counters->match->match->value))) - 1;
data/ldns-1.7.1/examples/ldns-dpa.c:565:79:  [2] (integer) atol:
  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).
			result += (size_t) abs((int) (atol(counters->right->match->match->value) - atol(counters->match->match->value))) - 1;
data/ldns-1.7.1/examples/ldns-dpa.c:837:23:  [2] (integer) atol:
  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).
					total_matches -= atol(get_second_match_expression(counters, cur)->match->value) - atol(get_first_match_expression(counters, cur)->match->value);
data/ldns-1.7.1/examples/ldns-dpa.c:837:88:  [2] (integer) atol:
  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).
					total_matches -= atol(get_second_match_expression(counters, cur)->match->value) - atol(get_first_match_expression(counters, cur)->match->value);
data/ldns-1.7.1/examples/ldns-dpa.c:840:23:  [2] (integer) atol:
  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).
					total_matches -= atol(get_last_match_expression(counters, cur)->match->value) - atol(get_last_but_one_match_expression(counters, cur)->match->value);
data/ldns-1.7.1/examples/ldns-dpa.c:840:86:  [2] (integer) atol:
  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).
					total_matches -= atol(get_last_match_expression(counters, cur)->match->value) - atol(get_last_but_one_match_expression(counters, cur)->match->value);
data/ldns-1.7.1/examples/ldns-dpa.c:880:6:  [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).
	a = atoi(value);
data/ldns-1.7.1/examples/ldns-dpa.c:881:6:  [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).
	b = atoi(mvalue);
data/ldns-1.7.1/examples/ldns-dpa.c:922:7:  [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).
		i = atoi(value);
data/ldns-1.7.1/examples/ldns-dpa.c:943:7:  [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).
		i = atoi(mvalue);
data/ldns-1.7.1/examples/ldns-dpa.c:1055:7:  [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).
		i = atoi(value);
data/ldns-1.7.1/examples/ldns-dpa.c:1076:7:  [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).
		i = atoi(mvalue);
data/ldns-1.7.1/examples/ldns-dpa.c:1362:13:  [2] (integer) atol:
  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).
							ia = atol(moa->value);
data/ldns-1.7.1/examples/ldns-dpa.c:1363:13:  [2] (integer) atol:
  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).
							ib = atol(mob->value);
data/ldns-1.7.1/examples/ldns-dpa.c:2095: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(fragment_p->data, iptr, ip_len);
data/ldns-1.7.1/examples/ldns-dpa.c:2112: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(fragment_p->data + (ip_f_offset) + 20, data+data_offset+20, ip_len - (iptr->ip_hl)*4);
data/ldns-1.7.1/examples/ldns-dpa.c:2136: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(fragment_p->data + ip_f_offset + 20, data+data_offset+20, ip_len - 20);
data/ldns-1.7.1/examples/ldns-dpa.c:2144: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((char *) newdata, data, data_offset);
data/ldns-1.7.1/examples/ldns-dpa.c:2145: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((char *) newdata+data_offset, fragment_p->data, fragment_p->cur_len);
data/ldns-1.7.1/examples/ldns-dpa.c:2575: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 errbuf[PCAP_ERRBUF_SIZE];
data/ldns-1.7.1/examples/ldns-dpa.c:2702:22:  [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).
				unique_minimum = atoi(argv[i+1]);
data/ldns-1.7.1/examples/ldns-dpa.c:2713:17:  [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).
				verbosity = atoi(argv[i]);
data/ldns-1.7.1/examples/ldns-dpa.c:2760:25:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		        hexdumpfile = fopen(hexdumpfilename, "w");
data/ldns-1.7.1/examples/ldns-gen-zone.c:50: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.
        char digeststr[70];
data/ldns-1.7.1/examples/ldns-gen-zone.c:118:34:  [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).
                        addrrs = atoi(optarg);
data/ldns-1.7.1/examples/ldns-gen-zone.c:132:34:  [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).
                        dsperc = atoi(optarg);
data/ldns-1.7.1/examples/ldns-gen-zone.c:164:22:  [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(filename, "r");
data/ldns-1.7.1/examples/ldns-key2ds.c:139:10:  [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).
	keyfp = fopen(keyname, "r");
data/ldns-1.7.1/examples/ldns-key2ds.c:186:11:  [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).
			dsfp = fopen(dsname, "w");
data/ldns-1.7.1/examples/ldns-keyfetcher.c:524: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(filename, "r");
data/ldns-1.7.1/examples/ldns-keyfetcher.c:617: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).
					verbosity = atoi(argv[i]+2);
data/ldns-1.7.1/examples/ldns-keyfetcher.c:622: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).
					verbosity = atoi(argv[i+1]);
data/ldns-1.7.1/examples/ldns-keyfetcher.c:712:18:  [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).
				outputfile = fopen(outputfile_str, "w");
data/ldns-1.7.1/examples/ldns-keygen.c:98:22:  [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).
			bits = (uint16_t) atoi(optarg);
data/ldns-1.7.1/examples/ldns-keygen.c:109: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).
			random = fopen(optarg, "r");
data/ldns-1.7.1/examples/ldns-keygen.c:235: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).
		random = fopen("/dev/random", "r");
data/ldns-1.7.1/examples/ldns-keygen.c:309:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	file = fopen(filename, "w");
data/ldns-1.7.1/examples/ldns-keygen.c:331: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(filename, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
data/ldns-1.7.1/examples/ldns-keygen.c:354:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		file = fopen(filename, "w");
data/ldns-1.7.1/examples/ldns-notify.c:202:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			max_num_retry = atoi(optarg);
data/ldns-1.7.1/examples/ldns-notify.c:206: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).
			soa_version = (uint32_t)atoi(optarg);
data/ldns-1.7.1/examples/ldns-notify.c:313: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[10240];
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:52:32:  [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).
			nsec3_algorithm = (uint8_t) atoi(optarg);
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:78:36:  [2] (integer) atol:
  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).
			nsec3_iterations_cmd = (size_t) atol(optarg);
data/ldns-1.7.1/examples/ldns-read-zone.c:177:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
						atoi(optarg);
data/ldns-1.7.1/examples/ldns-read-zone.c:182:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
						atoi(optarg);
data/ldns-1.7.1/examples/ldns-read-zone.c:250:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/ldns-1.7.1/examples/ldns-resolver.c:28:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(rand = fopen(argv[1], "r"))) {
data/ldns-1.7.1/examples/ldns-revoke.c:55:10:  [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).
	keyfp = fopen(keyname, "r");
data/ldns-1.7.1/examples/ldns-revoke.c:88:11:  [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).
		keyfp = fopen(keyname, "w");
data/ldns-1.7.1/examples/ldns-rrsig.c:38: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 incep_buf[26];
data/ldns-1.7.1/examples/ldns-rrsig.c:39:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char expir_buf[26];
data/ldns-1.7.1/examples/ldns-signzone.c:222: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).
	keyfile = fopen(keyfile_name, "r");
data/ldns-1.7.1/examples/ldns-signzone.c:609:32:  [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).
			nsec3_algorithm = (uint8_t) atoi(optarg);
data/ldns-1.7.1/examples/ldns-signzone.c:648:29:  [2] (integer) atol:
  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).
				expiration = (uint32_t) atol(optarg);
data/ldns-1.7.1/examples/ldns-signzone.c:675:28:  [2] (integer) atol:
  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).
				inception = (uint32_t) atol(optarg);
data/ldns-1.7.1/examples/ldns-signzone.c:748:36:  [2] (integer) atol:
  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).
			nsec3_iterations_cmd = (size_t) atol(optarg);
data/ldns-1.7.1/examples/ldns-signzone.c:801: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).
		zonefile = fopen(zonefile_name, "r");
data/ldns-1.7.1/examples/ldns-signzone.c:848: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).
		keyfile = fopen(keyfile_name, "r");
data/ldns-1.7.1/examples/ldns-signzone.c:983:17:  [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).
			outputfile = fopen(outputfile_name, "w");
data/ldns-1.7.1/examples/ldns-testns.c:477: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).
                	forknum = atoi(optarg);
data/ldns-1.7.1/examples/ldns-testns.c:482:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			port = atoi(optarg);
data/ldns-1.7.1/examples/ldns-testpkts.c:431: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[MAX_LINE];
data/ldns-1.7.1/examples/ldns-testpkts.c:463: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).
			*default_ttl = (uint32_t)atoi(parse);
data/ldns-1.7.1/examples/ldns-testpkts.c:565:9:  [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((in=fopen(name, "r")) == NULL) {
data/ldns-1.7.1/examples/ldns-testpkts.c:887: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(outbuf, ldns_buffer_begin(p->reply_from_hex), answer_size);
data/ldns-1.7.1/examples/ldns-verify-zone.c:69: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(filename, "r"))) {
data/ldns-1.7.1/examples/ldns-verify-zone.c:822:38:  [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).
                        percentage = atoi(optarg);
data/ldns-1.7.1/examples/ldns-verify-zone.c:849:19:  [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).
				check_time += atoi(optarg);
data/ldns-1.7.1/examples/ldns-verify-zone.c:858: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).
			verbosity = atoi(optarg);
data/ldns-1.7.1/examples/ldns-verify-zone.c:883:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/ldns-1.7.1/examples/ldns-walk.c:54:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&wire[1], ldns_rdf_data(dname) + 1, labellen);
data/ldns-1.7.1/examples/ldns-walk.c:55: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(&wire[labellen+1], ldns_rdf_data(dname) + labellen, ldns_rdf_size(dname) - labellen);
data/ldns-1.7.1/examples/ldns-walk.c:67: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(&wire[1], ldns_rdf_data(dname) + 1, labellen);
data/ldns-1.7.1/examples/ldns-walk.c:68: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(&wire[labellen], ldns_rdf_data(dname) + labellen, ldns_rdf_size(dname) - labellen);
data/ldns-1.7.1/examples/ldns-zcat.c:87: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(argv[i], "r"))) {
data/ldns-1.7.1/examples/ldns-zsplit.c:60:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if (!(kfp = fopen(files[i], "r"))) {
data/ldns-1.7.1/examples/ldns-zsplit.c:79: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 filename[FILE_SIZE];
data/ldns-1.7.1/examples/ldns-zsplit.c:89: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(filename, "w"))) {
data/ldns-1.7.1/examples/ldns-zsplit.c:138: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).
				split = (size_t)atoi(optarg);
data/ldns-1.7.1/examples/ldns-zsplit.c:176: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(argv[0], "r"))) {
data/ldns-1.7.1/examples/ldnsd.c:133:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		port = atoi(argv[2]);
data/ldns-1.7.1/examples/ldnsd.c:147: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).
	zone_fp = fopen(zone_file, "r");
data/ldns-1.7.1/higher.c:253:22:  [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(LDNS_RESOLV_HOSTS, "r");
data/ldns-1.7.1/higher.c:256:22:  [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(filename, "r");
data/ldns-1.7.1/host2str.c:414: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 date_buf[16];
data/ldns-1.7.1/host2str.c:427:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[INET_ADDRSTRLEN];
data/ldns-1.7.1/host2str.c:438:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[INET6_ADDRSTRLEN];
data/ldns-1.7.1/host2str.c:1111: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(gateway_data, &data[offset], LDNS_IP4ADDRLEN);
data/ldns-1.7.1/host2str.c:1127: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(gateway_data, &data[offset], LDNS_IP6ADDRLEN);
data/ldns-1.7.1/host2str.c:1158: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(public_key_data, &data[offset], public_key_size);
data/ldns-1.7.1/host2str.c:1339: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(relay_data, &data[offset], LDNS_IP4ADDRLEN);
data/ldns-1.7.1/host2str.c:1355: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(relay_data, &data[offset], LDNS_IP6ADDRLEN);
data/ldns-1.7.1/keys.c:200: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[16384];
data/ldns-1.7.1/keys.c:259: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[16384];
data/ldns-1.7.1/keys.c:346: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[16384];
data/ldns-1.7.1/keys.c:398: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[16384];
data/ldns-1.7.1/keys.c:1031: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 d[LDNS_MAX_LINELEN];
data/ldns-1.7.1/keys.c:1210:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			  memcpy(&hmac[offset], &i, sizeof(i));
data/ldns-1.7.1/keys.c:1215:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			  memcpy(&hmac[offset], &i, size - offset);
data/ldns-1.7.1/keys.c:2031: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(bin, ldns_key_hmac_key(k), size);
data/ldns-1.7.1/keys.c:2094: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(filename, "r");
data/ldns-1.7.1/ldns/buffer.h:363: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(buffer->_data + at, data, count);
data/ldns-1.7.1/ldns/buffer.h:488:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data, buffer->_data + at, count);
data/ldns-1.7.1/ldns/sha1.h:14: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   buffer[LDNS_SHA1_BLOCK_LENGTH];
data/ldns-1.7.1/ldns/sha1.h:18:60:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void ldns_sha1_transform(uint32_t state[5], const unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH]);
data/ldns-1.7.1/ldns/sha1.h:20:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
void ldns_sha1_final(unsigned char digest[LDNS_SHA1_DIGEST_LENGTH], ldns_sha1_ctx *context);
data/ldns-1.7.1/net.c:85:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(&(data_in->sin_addr), ldns_rdf_data(rd), ldns_rdf_size(rd));
data/ldns-1.7.1/net.c:94:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                        memcpy(&data_in6->sin6_addr, ldns_rdf_data(rd), ldns_rdf_size(rd));
data/ldns-1.7.1/net.c:691: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(sendbuf + 2, ldns_buffer_begin(qbin), ldns_buffer_position(qbin));
data/ldns-1.7.1/radix.c:932: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[0], &node->array[0], node->len*sizeof(ldns_radix_array_t));
data/ldns-1.7.1/radix.c:1034: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(dup_str, str_to_add, strlen_to_add);
data/ldns-1.7.1/radix.c:1144: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(common_str, str_to_add, common_len);
data/ldns-1.7.1/radix.c:1403: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(join_str, parent->array[parent_index].str,
data/ldns-1.7.1/radix.c:1569: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(a, node->array, sizeof(ldns_radix_array_t)*node->len);
data/ldns-1.7.1/rdata.c:170: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(rdf_data + 2, data, size);
data/ldns-1.7.1/rdata.c:216:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(rdf->_data, data, size);
data/ldns-1.7.1/rdata.c:581:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data + 4, hit, hit_size);
data/ldns-1.7.1/rdata.c:582:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data + 4 + hit_size, pk, pk_size);
data/ldns-1.7.1/resolver.c:673: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.
	(void) memcpy(dst, src, sizeof(ldns_resolver));
data/ldns-1.7.1/resolver.c:704:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		(void) memcpy(dst->_rtt, src->_rtt,
data/ldns-1.7.1/resolver.c:768: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 *keyword[LDNS_RESOLV_KEYWORDS];
data/ldns-1.7.1/resolver.c:769: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[LDNS_MAX_LINELEN + 1];
data/ldns-1.7.1/resolver.c:783:10:  [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).
		myfp = fopen("/etc/resolv.conf", "r");
data/ldns-1.7.1/resolver.c:1009:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(LDNS_RESOLV_CONF, "r");
data/ldns-1.7.1/resolver.c:1012:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/ldns-1.7.1/resolver.c:1186: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(new_rtt, old_rtt, sizeof(size_t)
data/ldns-1.7.1/rr.c:430: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).
			hex_data_size = (uint16_t) atoi(rd);
data/ldns-1.7.1/rr.c:2674:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		return atoi(name + 4);
data/ldns-1.7.1/rr.c:2712:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		return atoi(name + 5);
data/ldns-1.7.1/rr_functions.c:370: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 s_str[11];
data/ldns-1.7.1/rr_functions.c:375:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	new_s = (int32_t) atoi(s_str);
data/ldns-1.7.1/sha1.c:47:55:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
ldns_sha1_transform(uint32_t state[5], const unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH])
data/ldns-1.7.1/sha1.c:51: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 c[64];
data/ldns-1.7.1/sha1.c:56: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 workspace[LDNS_SHA1_BLOCK_LENGTH];
data/ldns-1.7.1/sha1.c:145:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
ldns_sha1_final(unsigned char digest[LDNS_SHA1_DIGEST_LENGTH], ldns_sha1_ctx *context)
data/ldns-1.7.1/sha1.c:148: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 finalcount[8];
data/ldns-1.7.1/sha2.c:173:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define MEMCPY_BCOPY(d,s,l)	memcpy((d), (s), (l))
data/ldns-1.7.1/sha2.c:177:29:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define MEMCPY_BCOPY(d,s,l)	bcopy((s), (d), (l))
data/ldns-1.7.1/str2host.c:100: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(r, &l, sizeof(uint32_t));
data/ldns-1.7.1/str2host.c:112: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(r, &l, sizeof(uint32_t));
data/ldns-1.7.1/str2host.c:169:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&data[1], salt, salt_length);
data/ldns-1.7.1/str2host.c:219: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(r, &l, sizeof(uint32_t));
data/ldns-1.7.1/str2host.c:504:22:  [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).
	family = (uint16_t) atoi(my_str);
data/ldns-1.7.1/str2host.c:556: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).
	prefix = (uint8_t) atoi(my_str);
data/ldns-1.7.1/str2host.c:572:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data + 4, afdpart, afdlength);
data/ldns-1.7.1/str2host.c:1152:17:  [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).
				serv_port = atoi(token);
data/ldns-1.7.1/str2host.c:1208:23:  [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).
		data[0] = (uint8_t) atoi(proto_str);
data/ldns-1.7.1/str2host.c:1210:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data + 1, bitmap, (size_t) bm_len);
data/ldns-1.7.1/str2host.c:1304: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).
					precedence = (uint8_t)atoi(token);
data/ldns-1.7.1/str2host.c:1307: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).
					gateway_type = (uint8_t)atoi(token);
data/ldns-1.7.1/str2host.c:1310:27:  [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).
					algorithm = (uint8_t)atoi(token);
data/ldns-1.7.1/str2host.c:1401: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(data + 3,
data/ldns-1.7.1/str2host.c:1403: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(data + 3 + ldns_rdf_size(gateway_rdf),
data/ldns-1.7.1/str2host.c:1406: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(data + 3,
data/ldns-1.7.1/str2host.c:1515:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(data + 1, str, strlen(str));
data/ldns-1.7.1/str2host.c:1708:26:  [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).
			precedence = (uint8_t)atoi(token);
data/ldns-1.7.1/str2host.c:1711:34:  [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).
			discovery_optional = (uint8_t)atoi(token);
data/ldns-1.7.1/str2host.c:1721:26:  [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).
			relay_type = (uint8_t)atoi(token);
data/ldns-1.7.1/str2host.c:1788: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(data + 2,
data/ldns-1.7.1/tsig.c:124: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(wire2, wire, *result_len);
data/ldns-1.7.1/util.c:349:17:  [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 ((rand_f = fopen("/dev/urandom", "r")) == NULL) {
data/ldns-1.7.1/util.c:351:18:  [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 ((rand_f = fopen("/dev/random", "r")) == NULL) {
data/ldns-1.7.1/wire2host.c:122: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_dname[dname_pos], &wire[*pos], label_size);
data/ldns-1.7.1/wire2host.c:293: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(data, &wire[*pos], cur_rdf_length);
data/ldns-1.7.1/compat/b64_pton.c:130:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(origsrc) == 0) {
data/ldns-1.7.1/compat/inet_ntop.c:189: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).
			tp += strlen(tp);
data/ldns-1.7.1/compat/snprintf.c:590: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).
	else	w = (int)strlen(s); /* up to the nul */
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5160: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).
  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5168:59:  [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 sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5172:59:  [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 sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5192: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).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5220: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).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5241: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).
     sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5263: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).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5291: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).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5312: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).
     sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:5360: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).
#  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6144:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        STRLEN len = strlen(radix);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6728: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).
    return strlen(buffer);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6768: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).
    used = strlen(dst);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6769: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).
    length = strlen(src);
data/ldns-1.7.1/contrib/DNS-LDNS/ppport.h:6798: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).
    length = strlen(src);
data/ldns-1.7.1/dane.c:820:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	else if (strlen(basename) && (basename[strlen(basename)-1]  = 0))
data/ldns-1.7.1/dane.c:820:41:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	else if (strlen(basename) && (basename[strlen(basename)-1]  = 0))
data/ldns-1.7.1/dname.c:523: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).
        if(!dname_str || strlen(dname_str) < 2)
data/ldns-1.7.1/dname.c:525:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(dname_str[strlen(dname_str) - 1] != '.')
data/ldns-1.7.1/dname.c:527:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(dname_str[strlen(dname_str) - 2] != '\\')
data/ldns-1.7.1/dnssec.c:1644: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).
			if (next_nsec_owner_str[strlen(next_nsec_owner_str) - 1]
data/ldns-1.7.1/dnssec.c:1646: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).
				next_nsec_owner_str[strlen(next_nsec_owner_str) - 1]
data/ldns-1.7.1/dnssec.c:1664: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).
			if (next_nsec_owner_str[strlen(next_nsec_owner_str) - 1]
data/ldns-1.7.1/dnssec.c:1666: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).
				next_nsec_owner_str[strlen(next_nsec_owner_str) - 1]
data/ldns-1.7.1/dnssec_verify.c:1052:7:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	bool equal;
data/ldns-1.7.1/dnssec_verify.c:1061:10:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
					if (equal) {
data/ldns-1.7.1/drill/drill.c:24:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(name) > 5 &&
data/ldns-1.7.1/drill/drill.c:375:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						tsig_algorithm = xmalloc(strlen(optarg) - tsig_separator2);
data/ldns-1.7.1/drill/drill.c:376:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(tsig_algorithm, optarg + tsig_separator2 + 1, strlen(optarg) - tsig_separator2);
data/ldns-1.7.1/drill/drill.c:376: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).
						strncpy(tsig_algorithm, optarg + tsig_separator2 + 1, strlen(optarg) - tsig_separator2);
data/ldns-1.7.1/drill/drill.c:377:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						tsig_algorithm[strlen(optarg) - tsig_separator2 - 1] = '\0';
data/ldns-1.7.1/drill/drill.c:379: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).
						tsig_separator2 = strlen(optarg);
data/ldns-1.7.1/drill/drill.c:384:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(tsig_name, optarg, tsig_separator);
data/ldns-1.7.1/drill/drill.c:385:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(tsig_data, optarg + tsig_separator + 1, tsig_separator2 - tsig_separator - 1);
data/ldns-1.7.1/drill/drill.c:450: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).
			if (strlen(argv[i]) == 1) {
data/ldns-1.7.1/drill/drill.c:585: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).
		if (!res || strlen(serv) <= 0) {
data/ldns-1.7.1/drill/drill_util.c:23:7:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = getc(input);
data/ldns-1.7.1/drill/work.c:96:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = fgetc(fp);
data/ldns-1.7.1/drill/work.c:126:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = fgetc(fp);
data/ldns-1.7.1/duration.c:266:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/duration.c:272:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/duration.c:278:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/duration.c:284:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/duration.c:287:15:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
        str = strcat(str, "T");
data/ldns-1.7.1/duration.c:293:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/duration.c:299:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/duration.c:305:15:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        str = strncat(str, num, count+2);
data/ldns-1.7.1/examples/ldns-dane.c:220:34:  [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 (strncasecmp(arg, t->name, strlen(arg)) == 0) {
data/ldns-1.7.1/examples/ldns-dane.c:384:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			to_write = (int) read(STDIN_FILENO, buf, BUFSIZE - 1);
data/ldns-1.7.1/examples/ldns-dane.c:1418: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).
	if (strncasecmp(*argv, "create", strlen(*argv)) == 0) {
data/ldns-1.7.1/examples/ldns-dane.c:1425: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).
	} else if (strncasecmp(*argv, "verify", strlen(*argv)) == 0) {
data/ldns-1.7.1/examples/ldns-dane.c:1486:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (port_str[strlen(port_str) - 1] == '.') {
data/ldns-1.7.1/examples/ldns-dane.c:1487: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).
				port_str[strlen(port_str) - 1] = '\000';
data/ldns-1.7.1/examples/ldns-dane.c:1505:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (transport_str[strlen(transport_str) - 1] == '.') {
data/ldns-1.7.1/examples/ldns-dane.c:1506: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).
				transport_str[strlen(transport_str) - 1] =
data/ldns-1.7.1/examples/ldns-dpa.c:379:20:  [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).
					tmp2 = malloc(strlen(tmp) + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:380: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).
					for (pos = 0; pos < strlen(tmp); pos++) {
data/ldns-1.7.1/examples/ldns-dpa.c:989: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).
		for (i = 0; i < strlen(valuedup); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:992: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).
		for (i = 0; i < strlen(mvaluedup); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:1661: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).
	char *str = calloc(1, strlen(string) + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:1664: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).
	for (i = 0; i < strlen(string); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:1678: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).
	for (i = 0; i < strlen(str); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:1683:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(left_str, &str[leftstart], leftend-leftstart+1);
data/ldns-1.7.1/examples/ldns-dpa.c:1700:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(left_str, &str[leftstart], leftend-leftstart+1);
data/ldns-1.7.1/examples/ldns-dpa.c:1719: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).
				if (i > strlen(str)) {
data/ldns-1.7.1/examples/ldns-dpa.c:1738:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(left_str, &str[leftstart], leftend - leftstart + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:1741: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).
			if (i >= strlen(str)-1) {
data/ldns-1.7.1/examples/ldns-dpa.c:1757: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).
	for (i = 0; i < strlen(str); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:1771: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).
			if (i > strlen(str)) {
data/ldns-1.7.1/examples/ldns-dpa.c:1785: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).
				if (i > strlen(str)) {
data/ldns-1.7.1/examples/ldns-dpa.c:1795:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(left_str, &str[leftstart], leftend - leftstart + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:2032: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).
			i = strlen(str) + 1;
data/ldns-1.7.1/examples/ldns-dpa.c:2466: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).
	for (i = 0; i < strlen(string); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:2472: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).
				substring = malloc(strlen(string)+1);
data/ldns-1.7.1/examples/ldns-dpa.c:2473:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(substring, &string[lastpos], i - lastpos + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:2491: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).
	substring = malloc(strlen(string) + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:2492:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(substring, &string[lastpos], i - lastpos + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:2520: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).
	str = calloc(1, strlen(string) + 1);
data/ldns-1.7.1/examples/ldns-dpa.c:2522: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).
	for (i = 0; i < strlen(string); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:2531: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).
	for (i = 0; i <= strlen(str); i++) {
data/ldns-1.7.1/examples/ldns-dpa.c:2532: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 (str[i] == ',' || i >= strlen(str)) {
data/ldns-1.7.1/examples/ldns-dpa.c:2537:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(strpart, &str[lastpos], i - lastpos);
data/ldns-1.7.1/examples/ldns-dpa.c:2554:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(strpart, &str[lastpos], i - lastpos);
data/ldns-1.7.1/examples/ldns-gen-zone.c:80: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).
        const size_t classtypelen = strlen(classtypestr1);
data/ldns-1.7.1/examples/ldns-gen-zone.c:83:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        const size_t punylen = strlen(punystr);
data/ldns-1.7.1/examples/ldns-gen-zone.c:190:20:  [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).
        ownerlen = strlen(ownerstr);
data/ldns-1.7.1/examples/ldns-key2ds.c:180: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).
		dsname = LDNS_XMALLOC(char, strlen(owner) + 16);
data/ldns-1.7.1/examples/ldns-key2ds.c:181:20:  [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).
		snprintf(dsname, strlen(owner) + 15, "K%s+%03u+%05u.ds", owner, alg, (unsigned int) ldns_calc_keytag(k));
data/ldns-1.7.1/examples/ldns-keyfetcher.c:604:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(argv[i]) > 2) {
data/ldns-1.7.1/examples/ldns-keyfetcher.c:616:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				if (strlen(argv[i]) > 2) {
data/ldns-1.7.1/examples/ldns-keygen.c:307:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	filename = LDNS_XMALLOC(char, strlen(owner) + 17);
data/ldns-1.7.1/examples/ldns-keygen.c:308: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).
	snprintf(filename, strlen(owner) + 16, "K%s+%03u+%05u.key", owner, algorithm, (unsigned int) ldns_key_keytag(key));
data/ldns-1.7.1/examples/ldns-keygen.c:328:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	filename = LDNS_XMALLOC(char, strlen(owner) + 21);
data/ldns-1.7.1/examples/ldns-keygen.c:329: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).
	snprintf(filename, strlen(owner) + 20, "K%s+%03u+%05u.private", owner, algorithm, (unsigned int) ldns_key_keytag(key));
data/ldns-1.7.1/examples/ldns-keygen.c:352:33:  [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).
		filename = LDNS_XMALLOC(char, strlen(owner) + 16);
data/ldns-1.7.1/examples/ldns-keygen.c:353:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		snprintf(filename, strlen(owner) + 15, "K%s+%03u+%05u.ds", owner, algorithm, (unsigned int) ldns_key_keytag(key));
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:55: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).
			if (strlen(optarg) % 2 != 0) {
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:59: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).
			if (strlen(optarg) > 512) {
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:64: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).
			nsec3_salt_length = (uint8_t) (strlen(optarg) / 2);
data/ldns-1.7.1/examples/ldns-nsec3-hash.c:66: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).
			for (c = 0; c < (int) strlen(optarg); c += 2) {
data/ldns-1.7.1/examples/ldns-signzone.c:214: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).
	                            strlen(keyfile_name_base) + 5);
data/ldns-1.7.1/examples/ldns-signzone.c:216:4:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		 strlen(keyfile_name_base) + 5,
data/ldns-1.7.1/examples/ldns-signzone.c:631: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).
			if (strlen(optarg) == 8 &&
data/ldns-1.7.1/examples/ldns-signzone.c:639: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).
			} else if (strlen(optarg) == 14 &&
data/ldns-1.7.1/examples/ldns-signzone.c:653:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(outputfile_name, optarg, MAX_FILENAME_LEN);
data/ldns-1.7.1/examples/ldns-signzone.c:658: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).
			if (strlen(optarg) == 8 &&
data/ldns-1.7.1/examples/ldns-signzone.c:666: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).
			} else if (strlen(optarg) == 14 &&
data/ldns-1.7.1/examples/ldns-signzone.c:730: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).
			if (strlen(optarg) % 2 != 0) {
data/ldns-1.7.1/examples/ldns-signzone.c:734:34:  [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).
			nsec3_salt_length = (uint8_t) strlen(optarg) / 2;
data/ldns-1.7.1/examples/ldns-signzone.c:736: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).
			for (c = 0; c < (int) strlen(optarg); c += 2) {
data/ldns-1.7.1/examples/ldns-signzone.c:843: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).
		keyfile_name = LDNS_XMALLOC(char, strlen(keyfile_name_base) + 9);
data/ldns-1.7.1/examples/ldns-signzone.c:845:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			    strlen(keyfile_name_base) + 9,
data/ldns-1.7.1/examples/ldns-testpkts.c:67: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(keyword);
data/ldns-1.7.1/examples/ldns-update.c:151:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!fqdn || strlen(fqdn) == 0)
data/ldns-1.7.1/examples/ldns-update.c:168: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).
                rrstrlen = strlen(fqdn) + sizeof (" IN AAAA ") + strlen(ipaddr) + 1;
data/ldns-1.7.1/examples/ldns-update.c:168:66:  [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).
                rrstrlen = strlen(fqdn) + sizeof (" IN AAAA ") + strlen(ipaddr) + 1;
data/ldns-1.7.1/examples/ldns-verify-zone.c:838: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).
			if (strlen(optarg) == 14 &&
data/ldns-1.7.1/examples/ldns-walk.c:285: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).
					if (strlen(argv[i]) == 1) {
data/ldns-1.7.1/examples/ldns-walk.c:333: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).
		if (!res || strlen(serv) <= 0) {
data/ldns-1.7.1/keys.c:213: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).
	while(strlen(token) < 96) {
data/ldns-1.7.1/keys.c:215:34:  [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(ldns_fget_token_l(fp, token+strlen(token), "\n",
data/ldns-1.7.1/keys.c:216: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).
			sizeof(token)-strlen(token), line_nr) == -1)
data/ldns-1.7.1/keys.c:785:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:796:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:806:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:816:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:826:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:836:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:846:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:856:70:  [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).
	i = ldns_b64_pton((const char*)b, buf, ldns_b64_ntop_calculate_size(strlen(b)));
data/ldns-1.7.1/keys.c:935:70:  [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).
	i = ldns_b64_pton((const char*)d, buf, ldns_b64_ntop_calculate_size(strlen(d)));
data/ldns-1.7.1/keys.c:946:70:  [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).
	i = ldns_b64_pton((const char*)d, buf, ldns_b64_ntop_calculate_size(strlen(d)));
data/ldns-1.7.1/keys.c:956:70:  [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).
	i = ldns_b64_pton((const char*)d, buf, ldns_b64_ntop_calculate_size(strlen(d)));
data/ldns-1.7.1/keys.c:966:70:  [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).
	i = ldns_b64_pton((const char*)d, buf, ldns_b64_ntop_calculate_size(strlen(d)));
data/ldns-1.7.1/keys.c:976:70:  [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).
	i = ldns_b64_pton((const char*)d, buf, ldns_b64_ntop_calculate_size(strlen(d)));
data/ldns-1.7.1/keys.c:1038: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).
	                    ldns_b64_ntop_calculate_size(strlen(d))))) == NULL
data/ldns-1.7.1/keys.c:2103:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = fgetc(fp)) && i+1 < LDNS_MAX_PACKETLEN && c != EOF) {
data/ldns-1.7.1/ldns/buffer.h:388: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).
	ldns_buffer_write_at(buffer, at, str, strlen(str));
data/ldns-1.7.1/ldns/buffer.h:399:33:  [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).
	ldns_buffer_write(buffer, str, strlen(str));
data/ldns-1.7.1/parse.c:58:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = getc(f)) != EOF) {
data/ldns-1.7.1/parse.c:195:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
       if(strlen(keyword) >= LDNS_MAX_KEYWORDLEN)
data/ldns-1.7.1/parse.c:388:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((c = fgetc(fp)) != EOF) {
data/ldns-1.7.1/parse.c:414:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
       if(strlen(keyword) >= LDNS_MAX_KEYWORDLEN)
data/ldns-1.7.1/parse.c:427: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 (strncmp(fkeyword, keyword, strlen(keyword)) == 0) {
data/ldns-1.7.1/resolver.c:822:45:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                        c = fgetc(myfp);
data/ldns-1.7.1/rr.c:178:47:  [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).
	ldns_buffer_new_frm_data(rr_buf, (char*)str, strlen(str));
data/ldns-1.7.1/rr.c:194:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(ttl) > 0 && !isdigit((int) ttl[0])) {
data/ldns-1.7.1/rr.c:212: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).
			type_sz = strlen(ttl) + 1;
data/ldns-1.7.1/rr.c:232: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).
			type_sz = strlen(clas) + 1;
data/ldns-1.7.1/rr.c:260: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).
	ldns_buffer_new_frm_data(rd_buf, rdata, strlen(rdata));
data/ldns-1.7.1/rr.c:262:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(owner) <= 1 && strncmp(owner, "@", 1) == 0) {
data/ldns-1.7.1/rr.c:281: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(owner) == 0) {
data/ldns-1.7.1/rr.c:408: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).
		rd_strlen = strlen(rd);
data/ldns-1.7.1/rr.c:445:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				rd_strlen = strlen(rd);
data/ldns-1.7.1/rr.c:504:14:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
						(void) strncat(rd, xtok,
data/ldns-1.7.1/rr.c:506:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							strlen(rd) - 1);
data/ldns-1.7.1/rr.c:531:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
					(void) strncat(rd, " ",
data/ldns-1.7.1/rr.c:533:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							strlen(rd) - 1);
data/ldns-1.7.1/rr.c:534:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					(void) strncat(rd, xtok,
data/ldns-1.7.1/rr.c:536:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							strlen(rd) - 1);
data/ldns-1.7.1/rr.c:544:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
					(void) strncat(rd, " ",
data/ldns-1.7.1/rr.c:546:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							strlen(rd) - 1);
data/ldns-1.7.1/rr.c:547:13:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					(void) strncat(rd, xtok,
data/ldns-1.7.1/rr.c:549:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							strlen(rd) - 1);
data/ldns-1.7.1/rr.c:2673:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(name) > 4 && strncasecmp(name, "TYPE", 4) == 0) {
data/ldns-1.7.1/rr.c:2682:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		   strlen(name) == strlen(desc_name) &&
data/ldns-1.7.1/rr.c:2682:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		   strlen(name) == strlen(desc_name) &&
data/ldns-1.7.1/rr.c:2683: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).
		   strncasecmp(name, desc_name, strlen(desc_name)) == 0) {
data/ldns-1.7.1/rr.c:2690:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(name) == 4 && strncasecmp(name, "IXFR", 4) == 0) {
data/ldns-1.7.1/rr.c:2692: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).
	} else if (strlen(name) == 4 && strncasecmp(name, "AXFR", 4) == 0) {
data/ldns-1.7.1/rr.c:2694: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).
	} else if (strlen(name) == 5 && strncasecmp(name, "MAILB", 5) == 0) {
data/ldns-1.7.1/rr.c:2696: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).
	} else if (strlen(name) == 5 && strncasecmp(name, "MAILA", 5) == 0) {
data/ldns-1.7.1/rr.c:2698: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).
	} else if (strlen(name) == 3 && strncasecmp(name, "ANY", 3) == 0) {
data/ldns-1.7.1/rr.c:2711:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(name) > 5 && strncasecmp(name, "CLASS", 5) == 0) {
data/ldns-1.7.1/sha2.c:98:32:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
#error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN
data/ldns-1.7.1/str2host.c:71:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(time) == 14 &&
data/ldns-1.7.1/str2host.c:138: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).
	salt_length_str = (int)strlen(salt_str);
data/ldns-1.7.1/str2host.c:320: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((char*)str);
data/ldns-1.7.1/str2host.c:434: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).
	dp = data = LDNS_XMALLOC(uint8_t, strlen(str) > 255 ? 256 : (strlen(str) + 1));
data/ldns-1.7.1/str2host.c:434:63:  [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).
	dp = data = LDNS_XMALLOC(uint8_t, strlen(str) > 255 ? 256 : (strlen(str) + 1));
data/ldns-1.7.1/str2host.c:490:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(my_str) < 2
data/ldns-1.7.1/str2host.c:512:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(my_ip_str, my_str, ip_str_len + 1);
data/ldns-1.7.1/str2host.c:593:62:  [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).
	buffer = LDNS_XMALLOC(uint8_t, ldns_b64_ntop_calculate_size(strlen(str)));
data/ldns-1.7.1/str2host.c:599: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).
						   ldns_b64_ntop_calculate_size(strlen(str)));
data/ldns-1.7.1/str2host.c:618: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 slen = strlen(str);
data/ldns-1.7.1/str2host.c:650: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(str);
data/ldns-1.7.1/str2host.c:710: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).
	ldns_buffer_new_frm_data(str_buf, (char *)str, strlen(str));
data/ldns-1.7.1/str2host.c:1052:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(my_str) > 0) {
data/ldns-1.7.1/str2host.c:1057:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(my_str) > 0) {
data/ldns-1.7.1/str2host.c:1062:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(my_str) > 0) {
data/ldns-1.7.1/str2host.c:1105:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(strlen(str) == 0)
data/ldns-1.7.1/str2host.c:1107: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).
	else 	token = LDNS_XMALLOC(char, strlen(str)+2);
data/ldns-1.7.1/str2host.c:1112: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).
	ldns_buffer_new_frm_data(str_buf, (char *)str, strlen(str));
data/ldns-1.7.1/str2host.c:1119: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).
	while(ldns_bget_token(str_buf, token, "\t\n ", strlen(str)) > 0) {
data/ldns-1.7.1/str2host.c:1242:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(str);
data/ldns-1.7.1/str2host.c:1259: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(str);
data/ldns-1.7.1/str2host.c:1288:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(strlen(str) == 0)
data/ldns-1.7.1/str2host.c:1290:34:  [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).
	else	token = LDNS_XMALLOC(char, strlen(str)+2);
data/ldns-1.7.1/str2host.c:1295: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).
	ldns_buffer_new_frm_data(str_buf, (char *)str, strlen(str));
data/ldns-1.7.1/str2host.c:1301: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).
	while(ldns_bget_token(str_buf, token, "\t\n ", strlen(str)) > 0) {
data/ldns-1.7.1/str2host.c:1433: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).
			l != (int)strlen(str) || /* more data to read */
data/ldns-1.7.1/str2host.c:1457: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).
			l != (int)strlen(str)) {
data/ldns-1.7.1/str2host.c:1480: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).
			l != (int)strlen(str)) {
data/ldns-1.7.1/str2host.c:1502:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) > 255) {
data/ldns-1.7.1/str2host.c:1510: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).
	data = LDNS_XMALLOC(uint8_t, strlen(str) + 1);
data/ldns-1.7.1/str2host.c:1514: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).
	data[0] = strlen(str);
data/ldns-1.7.1/str2host.c:1515: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(data + 1, str, strlen(str));
data/ldns-1.7.1/str2host.c:1517: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).
	*rd = ldns_rdf_new(LDNS_RDF_TYPE_TAG, strlen(str) + 1, data);
data/ldns-1.7.1/str2host.c:1532: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).
	dp = data = LDNS_XMALLOC(uint8_t, strlen(str));
data/ldns-1.7.1/str2host.c:1575:34:  [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).
	                : pk  == NULL ? strlen(hit + 1) : (size_t) (pk - hit) - 1;
data/ldns-1.7.1/str2host.c:1576: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).
	size_t  pk_size = pk  == NULL ? 0 : strlen(pk + 1);
data/ldns-1.7.1/str2host.c:1692:5:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if(strlen(str) == 0)
data/ldns-1.7.1/str2host.c:1694:34:  [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).
	else	token = LDNS_XMALLOC(char, strlen(str)+2);
data/ldns-1.7.1/str2host.c:1699: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).
	ldns_buffer_new_frm_data(str_buf, (char *)str, strlen(str));
data/ldns-1.7.1/str2host.c:1705: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).
	while(ldns_bget_token(str_buf, token, "\t\n ", strlen(str)) > 0) {
data/ldns-1.7.1/tsig.c:239:33:  [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).
			ldns_b64_pton_calculate_size(strlen(key_data)));
data/ldns-1.7.1/tsig.c:245: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).
	ldns_b64_pton_calculate_size(strlen(key_data)));
data/ldns-1.7.1/util.c:146:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strlen(str) % 2 != 0) {
data/ldns-1.7.1/util.c:150: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).
	for (i = 0; i < strlen(str) / 2; i++) {
data/ldns-1.7.1/util.c:354:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				for (read = 0; read < size; read++) {
data/ldns-1.7.1/util.c:356:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					seed[read] = (uint8_t) (tv.tv_usec % 256);
data/ldns-1.7.1/util.c:369:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read < size) {

ANALYSIS SUMMARY:

Hits = 526
Lines analyzed = 70342 in approximately 3.07 seconds (22887 lines/second)
Physical Source Lines of Code (SLOC) = 47128
Hits@level = [0] 1434 [1] 225 [2] 241 [3]  34 [4]  26 [5]   0
Hits@level+ = [0+] 1960 [1+] 526 [2+] 301 [3+]  60 [4+]  26 [5+]   0
Hits/KSLOC@level+ = [0+] 41.5889 [1+] 11.1611 [2+] 6.38686 [3+] 1.27313 [4+] 0.551689 [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.