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/libjdns-2.0.3/include/jdns/jdns.h
Examining data/libjdns-2.0.3/include/jdns/jdns_export.h
Examining data/libjdns-2.0.3/include/jdns/qjdns.h
Examining data/libjdns-2.0.3/include/jdns/qjdnsshared.h
Examining data/libjdns-2.0.3/tools/jdns/main.cpp
Examining data/libjdns-2.0.3/tools/jdns/main.h
Examining data/libjdns-2.0.3/src/jdns/jdns_sys.c
Examining data/libjdns-2.0.3/src/jdns/jdns_packet.c
Examining data/libjdns-2.0.3/src/jdns/jdns_mdnsd.c
Examining data/libjdns-2.0.3/src/jdns/jdns_packet.h
Examining data/libjdns-2.0.3/src/jdns/jdns_mdnsd.h
Examining data/libjdns-2.0.3/src/jdns/jdns_util.c
Examining data/libjdns-2.0.3/src/jdns/jdns.c
Examining data/libjdns-2.0.3/src/jdns/jdns_p.h
Examining data/libjdns-2.0.3/src/qjdns/qjdnsshared_p.h
Examining data/libjdns-2.0.3/src/qjdns/qjdns_sock.cpp
Examining data/libjdns-2.0.3/src/qjdns/qjdns_p.h
Examining data/libjdns-2.0.3/src/qjdns/qjdnsshared.cpp
Examining data/libjdns-2.0.3/src/qjdns/qjdns.cpp
Examining data/libjdns-2.0.3/src/qjdns/qjdns_sock.h

FINAL RESULTS:

data/libjdns-2.0.3/src/jdns/jdns_util.c:101:9:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	return vsprintf(str, format, ap);
data/libjdns-2.0.3/src/jdns/jdns_util.c:162:9:  [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).
	return strcpy(dst, src);
data/libjdns-2.0.3/src/qjdns/qjdnsshared.cpp:104:6:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	str.sprintf("%02x", in);
data/libjdns-2.0.3/tools/jdns/main.cpp:40:21:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			out += QString().sprintf("\\x%02x", (unsigned int)c);
data/libjdns-2.0.3/src/jdns/jdns_util.c:143:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	val = getenv(name);
data/libjdns-2.0.3/src/jdns/jdns.c:132: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(out, in, len);
data/libjdns-2.0.3/src/jdns/jdns.c:140: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(out, in, len);
data/libjdns-2.0.3/src/jdns/jdns.c:295: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[67]; // 3 * 16 + 2 + 16 + zero byte
data/libjdns-2.0.3/src/jdns/jdns.c:403: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 + 2, str->data, str->size);
data/libjdns-2.0.3/src/jdns/jdns.c:1016:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&s->cb, callbacks, sizeof(jdns_callbacks_t));
data/libjdns-2.0.3/src/jdns/jdns.c:2231:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char buf[JDNS_UDP_UNI_IN_MAX];
data/libjdns-2.0.3/src/jdns/jdns.c:3021:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(buf + at, texts->item[n]->data, len);
data/libjdns-2.0.3/src/jdns/jdns.c:3377:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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[JDNS_UDP_MUL_IN_MAX];
data/libjdns-2.0.3/src/jdns/jdns_mdnsd.c:80: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 to6[16];
data/libjdns-2.0.3/src/jdns/jdns_mdnsd.c:329: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(u->to6, addr->addr.v6, 16);
data/libjdns-2.0.3/src/jdns/jdns_packet.c:140:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char out[MAX_LABEL_LENGTH - 1];
data/libjdns-2.0.3/src/jdns/jdns_packet.c:210: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(out + out_size, label + 1, label_size);
data/libjdns-2.0.3/src/jdns/jdns_packet.c:363: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(label + i, name->data + at, len);
data/libjdns-2.0.3/src/jdns/jdns_packet.c:377: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 label[MAX_LABEL_LENGTH];
data/libjdns-2.0.3/src/jdns/jdns_packet.c:419: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(*bufp, label, len);
data/libjdns-2.0.3/src/jdns/jdns_packet.c:763: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(buf, write->value->data, write->value->size);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:137: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 defdname[256];		/* default domain (deprecated) */
data/libjdns-2.0.3/src/jdns/jdns_sys.c:186: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(out, in + at, len);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:239: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(out + pos, data, size);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:399: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 String[4 * 4];
data/libjdns-2.0.3/src/jdns/jdns_sys.c:408: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 HostName[MAX_HOSTNAME_LEN + 4] ;
data/libjdns-2.0.3/src/jdns/jdns_sys.c:409: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 DomainName[MAX_DOMAIN_NAME_LEN + 4];
data/libjdns-2.0.3/src/jdns/jdns_sys.c:413: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 ScopeId[MAX_SCOPE_ID_LEN + 4];
data/libjdns-2.0.3/src/jdns/jdns_sys.c:603: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(str, e->data, elen);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:745: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 prop_value[PROP_VALUE_MAX];
data/libjdns-2.0.3/src/jdns/jdns_sys.c:746: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 prop_name[PROP_NAME_MAX];
data/libjdns-2.0.3/src/jdns/jdns_sys.c:752:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(prop_name, "net.dns%d", i + 1);
data/libjdns-2.0.3/src/jdns/jdns_util.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(p, s, len);
data/libjdns-2.0.3/src/jdns/jdns_util.c:63: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(out, src, size);
data/libjdns-2.0.3/src/jdns/jdns_util.c:113: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).
	return fopen(path, mode);
data/libjdns-2.0.3/src/jdns/jdns_util.c:365:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->data, str, str_len);
data/libjdns-2.0.3/src/jdns/jdns_util.c:498: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->addr.v6, ipv6, 16);
data/libjdns-2.0.3/src/jdns/jdns_util.c:516:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char ipv6[16];
data/libjdns-2.0.3/src/jdns/jdns_util.c:611:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		unsigned char b[4];
data/libjdns-2.0.3/src/jdns/jdns_util.c:631: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(part, p, len);
data/libjdns-2.0.3/src/jdns/jdns_util.c:1285: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(&ip, pr->rdata, 4);
data/libjdns-2.0.3/src/jdns/jdns_util.c:1312: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(&priority, pr->rdata, 2);
data/libjdns-2.0.3/src/jdns/jdns_util.c:1328: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(&priority, pr->rdata, 2);
data/libjdns-2.0.3/src/jdns/jdns_util.c:1330: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(&weight, pr->rdata + 2, 2);
data/libjdns-2.0.3/src/jdns/jdns_util.c:1332: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(&port, pr->rdata + 4, 2);
data/libjdns-2.0.3/src/qjdns/qjdns_sock.cpp:55:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
       unsigned char  _S6_u8[16];
data/libjdns-2.0.3/src/qjdns/qjdns_sock.cpp:110: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(mc.ipv6mr_multiaddr.s6_addr, addr, 16);
data/libjdns-2.0.3/src/jdns/jdns.c:115:53:  [1] (buffer) strlen:
  Does not handle 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 _make_printable((const unsigned char *)str, strlen(str));
data/libjdns-2.0.3/src/jdns/jdns_mdnsd.c:170:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(low);
data/libjdns-2.0.3/src/jdns/jdns_p.h:94:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#define _ustrlen(str) strlen((const char *)str)
data/libjdns-2.0.3/src/jdns/jdns_sys.c:274:21:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		unsigned char c = fgetc(f);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:600: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).
	elen = strlen((char *)e->data);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:601: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).
	plen = strlen(path);
data/libjdns-2.0.3/src/jdns/jdns_sys.c:863: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(RESVAR.defdname) > 0)
data/libjdns-2.0.3/src/jdns/jdns_sys.c:880: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(RESVAR.dnsrch[n]) > 0)
data/libjdns-2.0.3/src/jdns/jdns_util.c:51: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(s) + 1; // the zero
data/libjdns-2.0.3/src/jdns/jdns_util.c:157: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(src);
data/libjdns-2.0.3/src/jdns/jdns_util.c:372: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).
	jdns_string_set(s, (const unsigned char *)str, strlen(str));
data/libjdns-2.0.3/src/jdns/jdns_util.c:509: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).
	int slen = strlen(str);

ANALYSIS SUMMARY:

Hits = 59
Lines analyzed = 13078 in approximately 0.33 seconds (39911 lines/second)
Physical Source Lines of Code (SLOC) = 9664
Hits@level = [0]  72 [1]  12 [2]  42 [3]   1 [4]   4 [5]   0
Hits@level+ = [0+] 131 [1+]  59 [2+]  47 [3+]   5 [4+]   4 [5+]   0
Hits/KSLOC@level+ = [0+] 13.5555 [1+] 6.10513 [2+] 4.86341 [3+] 0.517384 [4+] 0.413907 [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.