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/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c
Examining data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.c
Examining data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.h
Examining data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c
Examining data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.c
Examining data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.h
Examining data/smartdns-33+dfsg/src/dns.c
Examining data/smartdns-33+dfsg/src/dns.h
Examining data/smartdns-33+dfsg/src/dns_cache.c
Examining data/smartdns-33+dfsg/src/dns_cache.h
Examining data/smartdns-33+dfsg/src/dns_client.c
Examining data/smartdns-33+dfsg/src/dns_client.h
Examining data/smartdns-33+dfsg/src/dns_conf.c
Examining data/smartdns-33+dfsg/src/dns_conf.h
Examining data/smartdns-33+dfsg/src/dns_server.c
Examining data/smartdns-33+dfsg/src/dns_server.h
Examining data/smartdns-33+dfsg/src/fast_ping.c
Examining data/smartdns-33+dfsg/src/fast_ping.h
Examining data/smartdns-33+dfsg/src/http_parse.c
Examining data/smartdns-33+dfsg/src/http_parse.h
Examining data/smartdns-33+dfsg/src/include/art.h
Examining data/smartdns-33+dfsg/src/include/atomic.h
Examining data/smartdns-33+dfsg/src/include/bitmap.h
Examining data/smartdns-33+dfsg/src/include/bitops.h
Examining data/smartdns-33+dfsg/src/include/conf.h
Examining data/smartdns-33+dfsg/src/include/findbit.h
Examining data/smartdns-33+dfsg/src/include/gcc_builtin.h
Examining data/smartdns-33+dfsg/src/include/hash.h
Examining data/smartdns-33+dfsg/src/include/hashtable.h
Examining data/smartdns-33+dfsg/src/include/jhash.h
Examining data/smartdns-33+dfsg/src/include/list.h
Examining data/smartdns-33+dfsg/src/include/radix.h
Examining data/smartdns-33+dfsg/src/include/rbtree.h
Examining data/smartdns-33+dfsg/src/include/stringutil.h
Examining data/smartdns-33+dfsg/src/lib/art.c
Examining data/smartdns-33+dfsg/src/lib/bitops.c
Examining data/smartdns-33+dfsg/src/lib/conf.c
Examining data/smartdns-33+dfsg/src/lib/radix.c
Examining data/smartdns-33+dfsg/src/lib/rbtree.c
Examining data/smartdns-33+dfsg/src/lib/stringutil.c
Examining data/smartdns-33+dfsg/src/smartdns.c
Examining data/smartdns-33+dfsg/src/tlog.c
Examining data/smartdns-33+dfsg/src/tlog.h
Examining data/smartdns-33+dfsg/src/util.c
Examining data/smartdns-33+dfsg/src/util.h

FINAL RESULTS:

data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:179:7:  [4] (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).
						strcat(key, tmp);
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:191:6:  [4] (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).
					strcat(val, tmp);
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:179:7:  [4] (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).
						strcat(key, tmp);
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:191:6:  [4] (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).
					strcat(val, tmp);
data/smartdns-33+dfsg/src/dns_conf.c:1429:6:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	if (access(file_path, R_OK) != 0) {
data/smartdns-33+dfsg/src/dns_server.c:3622:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if (access(dns_cache_file, F_OK) == 0) {
data/smartdns-33+dfsg/src/include/radix.h:75:10:  [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 _snprintf
data/smartdns-33+dfsg/src/include/radix.h:75:19:  [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 _snprintf
data/smartdns-33+dfsg/src/tlog.c:166:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(path, F_OK) == 0) {
data/smartdns-33+dfsg/src/tlog.c:195:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if (access(path_c, F_OK) == 0) {
data/smartdns-33+dfsg/src/tlog.c:338:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buff, maxlen, format, ap);
data/smartdns-33+dfsg/src/tlog.c:408:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buff, maxlen, format, ap);
data/smartdns-33+dfsg/src/tlog.c:576:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(log_buf, sizeof(log_buf), format, ap);
data/smartdns-33+dfsg/src/tlog.c:650:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    while (access(archive_file, F_OK) == 0) {
data/smartdns-33+dfsg/src/tlog.c:946:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(gzip_file, F_OK) == 0) {
data/smartdns-33+dfsg/src/tlog.c:953:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(pending_file, F_OK) != 0) {
data/smartdns-33+dfsg/src/tlog.c:967:13:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            execl("/bin/sh", "sh", "-c", gzip_cmd, NULL);
data/smartdns-33+dfsg/src/tlog.c:993:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if (access(pending_file, F_OK) != 0) {
data/smartdns-33+dfsg/src/tlog.h:82:27:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    __attribute__((format(printf, 6, 7))) __attribute__((nonnull (6)));
data/smartdns-33+dfsg/src/tlog.h:157:86:  [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.
extern int tlog_printf(tlog_log *log, const char *format, ...) __attribute__((format(printf, 2, 3))) __attribute__((nonnull (1, 2)));
data/smartdns-33+dfsg/src/lib/conf.c:141:2:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	getopt_long(argc, argv, "", long_options, NULL);
data/smartdns-33+dfsg/src/smartdns.c:400:16:  [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 ((opt = getopt(argc, argv, "fhc:p:Svx")) != -1) {
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:121: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[4096];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.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 key[4096];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:123: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 val[4096];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:124:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[4096];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:136:28:  [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( (argc != 3) || ((in = fopen(argv[1], "r")) == NULL) || ((out = fopen(argv[2], "w")) == NULL) )
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:136:69:  [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( (argc != 3) || ((in = fopen(argv[1], "r")) == NULL) || ((out = fopen(argv[2], "w")) == NULL) )
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.c:74:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char res[4096];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.c:111:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((in = open(file, O_RDONLY)) == -1)
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.c:175:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pattern[16];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.c:176: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 path[PATH_MAX];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/template_lmo.h:69: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 lang[6];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:121: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[4096];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.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 key[4096];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:123: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 val[4096];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:124:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char tmp[4096];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:136:28:  [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( (argc != 3) || ((in = fopen(argv[1], "r")) == NULL) || ((out = fopen(argv[2], "w")) == NULL) )
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:136:69:  [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( (argc != 3) || ((in = fopen(argv[1], "r")) == NULL) || ((out = fopen(argv[2], "w")) == NULL) )
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.c:74:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char res[4096];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.c:111:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((in = open(file, O_RDONLY)) == -1)
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.c:175:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pattern[16];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.c:176: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 path[PATH_MAX];
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/template_lmo.h:69: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 lang[6];
data/smartdns-33+dfsg/src/dns.c:396: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_context.ptr, raw, raw_len);
data/smartdns-33+dfsg/src/dns.c:434: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(raw, data_context.ptr, rr_len);
data/smartdns-33+dfsg/src/dns.c:443: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 opt_data[DNS_MAX_OPT_LEN];
data/smartdns-33+dfsg/src/dns.c:450: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(opt->data, raw, raw_len);
data/smartdns-33+dfsg/src/dns.c:509: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_context.ptr, opt, total_len);
data/smartdns-33+dfsg/src/dns.c:526: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:548: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(opt, data_context.ptr, rr_len);
data/smartdns-33+dfsg/src/dns.c:567: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.
int dns_add_A(struct dns_packet *packet, dns_rr_type type, char *domain, int ttl, unsigned char addr[DNS_RR_A_LEN])
data/smartdns-33+dfsg/src/dns.c:567:92:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_add_A(struct dns_packet *packet, dns_rr_type type, char *domain, int ttl, unsigned char addr[DNS_RR_A_LEN])
data/smartdns-33+dfsg/src/dns.c:572:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_A(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_A_LEN])
data/smartdns-33+dfsg/src/dns.c:572:82:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_A(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_A_LEN])
data/smartdns-33+dfsg/src/dns.c:602:63:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_add_AAAA(struct dns_packet *packet, dns_rr_type type, char *domain, int ttl,
data/smartdns-33+dfsg/src/dns.c:603:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				 unsigned char addr[DNS_RR_AAAA_LEN])
data/smartdns-33+dfsg/src/dns.c:608:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_AAAA(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_AAAA_LEN])
data/smartdns-33+dfsg/src/dns.c:608:85:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_AAAA(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_AAAA_LEN])
data/smartdns-33+dfsg/src/dns.c:625:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[sizeof(*soa)];
data/smartdns-33+dfsg/src/dns.c:632: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(ptr, &soa->serial, sizeof(unsigned int));
data/smartdns-33+dfsg/src/dns.c:634: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(ptr, &soa->refresh, sizeof(unsigned int));
data/smartdns-33+dfsg/src/dns.c:636: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(ptr, &soa->retry, sizeof(unsigned int));
data/smartdns-33+dfsg/src/dns.c:638: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(ptr, &soa->expire, sizeof(unsigned int));
data/smartdns-33+dfsg/src/dns.c:640: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(ptr, &soa->minimum, sizeof(unsigned int));
data/smartdns-33+dfsg/src/dns.c:649:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[sizeof(*soa)];
data/smartdns-33+dfsg/src/dns.c:707: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 opt_data[DNS_MAX_OPT_LEN];
data/smartdns-33+dfsg/src/dns.c:713: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(opt->data, ecs, sizeof(*ecs));
data/smartdns-33+dfsg/src/dns.c:725: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 opt_data[DNS_MAX_OPT_LEN];
data/smartdns-33+dfsg/src/dns.c:742: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(ecs, opt->data, opt->length);
data/smartdns-33+dfsg/src/dns.c:762: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 opt_data[DNS_MAX_OPT_LEN];
data/smartdns-33+dfsg/src/dns.c:1005: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(output, ptr, copy_len);
data/smartdns-33+dfsg/src/dns.c:1149: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1192: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(context->ptr, data_context.ptr, rr_len);
data/smartdns-33+dfsg/src/dns.c:1205: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(raw, context->ptr, len);
data/smartdns-33+dfsg/src/dns.c:1227: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1293: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1370: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(ecs->addr, context->ptr, len);
data/smartdns-33+dfsg/src/dns.c:1385: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1416: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(context->ptr, dns_opt->data, dns_opt->length);
data/smartdns-33+dfsg/src/dns.c:1430: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1578: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1600: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1615: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 addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns.c:1629:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1657:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char ns[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1671:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1685: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 addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns.c:1736: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.c:1988:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[1024];
data/smartdns-33+dfsg/src/dns.c:1990: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 buff[4096];
data/smartdns-33+dfsg/src/dns.c:1992:11:  [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).
	int fd = open("dns.bin", O_RDWR);
data/smartdns-33+dfsg/src/dns.c:2013: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("dns-cmp.bin", O_CREAT | O_TRUNC | O_RDWR);
data/smartdns-33+dfsg/src/dns.h:119:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[0];
data/smartdns-33+dfsg/src/dns.h:134:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[0];
data/smartdns-33+dfsg/src/dns.h:154:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.h:155:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char rname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns.h:171: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 addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns.h:178:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[0];
data/smartdns-33+dfsg/src/dns.h:196: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.
int dns_add_A(struct dns_packet *packet, dns_rr_type type, char *domain, int ttl, unsigned char addr[DNS_RR_A_LEN]);
data/smartdns-33+dfsg/src/dns.h:196:92:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_add_A(struct dns_packet *packet, dns_rr_type type, char *domain, int ttl, unsigned char addr[DNS_RR_A_LEN]);
data/smartdns-33+dfsg/src/dns.h:197:36:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_A(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_A_LEN]);
data/smartdns-33+dfsg/src/dns.h:197:82:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_A(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_A_LEN]);
data/smartdns-33+dfsg/src/dns.h:202:63:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_add_AAAA(struct dns_packet *packet, dns_rr_type type, char *domain, int ttl,
data/smartdns-33+dfsg/src/dns.h:203:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
				 unsigned char addr[DNS_RR_AAAA_LEN]);
data/smartdns-33+dfsg/src/dns.h:204:39:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_AAAA(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_AAAA_LEN]);
data/smartdns-33+dfsg/src/dns.h:204:85:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int dns_get_AAAA(struct dns_rrs *rrs, char *domain, int maxsize, int *ttl, unsigned char addr[DNS_RR_AAAA_LEN]);
data/smartdns-33+dfsg/src/dns_cache.c:155: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(cache_addr->addr_data.addr, addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_cache.c:157: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(cache_addr->addr_data.addr, addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_cache.c:196: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(cache_packet->data, packet, packet_len);
data/smartdns-33+dfsg/src/dns_cache.c:265: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(&dns_cache->info, info, sizeof(*info));
data/smartdns-33+dfsg/src/dns_cache.c:539: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(&cache_data->head, &data_head, sizeof(data_head));
data/smartdns-33+dfsg/src/dns_cache.c:567: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(file, O_RDONLY);
data/smartdns-33+dfsg/src/dns_cache.c:614: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(&cache_record.info, &dns_cache->info, sizeof(struct dns_cache_info));
data/smartdns-33+dfsg/src/dns_cache.c:659: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(file, O_TRUNC | O_CREAT | O_WRONLY, 0640);
data/smartdns-33+dfsg/src/dns_cache.h:58:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[0];
data/smartdns-33+dfsg/src/dns_cache.h:65:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_cache.h:67: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 ipv4_addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns_cache.h:68: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 ipv6_addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns_cache.h:69: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 addr[0];
data/smartdns-33+dfsg/src/dns_cache.h:76:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[0];
data/smartdns-33+dfsg/src/dns_cache.h:80: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_cache.h:109:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char version[DNS_CACHE_VERSION_LEN];
data/smartdns-33+dfsg/src/dns_client.c:72: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 ipv4_addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns_client.c:73: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_addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns_client.c:74: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 addr[0];
data/smartdns-33+dfsg/src/dns_client.c:80:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[DNS_TCP_BUFFER];
data/smartdns-33+dfsg/src/dns_client.c:98:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_HOSTNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:136: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 group_name[DNS_GROUP_NAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:143:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[DNS_HOSTNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:144:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ipv4[DNS_HOSTNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:145: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 ipv6[DNS_HOSTNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:171: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 group_name[DNS_GROUP_NAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:220: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:824:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char port_s[8];
data/smartdns-33+dfsg/src/dns_client.c:944: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(&server_info->addr, gai->ai_addr, gai->ai_addrlen);
data/smartdns-33+dfsg/src/dns_client.c:1185: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(&pending->flags, flags, sizeof(struct client_dns_server_flags));
data/smartdns-33+dfsg/src/dns_client.c:1442: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(&replied_map->addr, addr, addr_len);
data/smartdns-33+dfsg/src/dns_client.c:1454: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:1457: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 packet_buff[DNS_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.c:1469:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char host_name[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:1796: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 inpacket[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.c:1799: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 from_host[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.c:1802: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 ans_data[4096];
data/smartdns-33+dfsg/src/dns_client.c:2282: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 peer_CN[256];
data/smartdns-33+dfsg/src/dns_client.c:2283: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 cert_fingerprint[256];
data/smartdns-33+dfsg/src/dns_client.c:2534: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(server_info->send_buff.data + server_info->send_buff.len, packet, len);
data/smartdns-33+dfsg/src/dns_client.c:2551: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 inpacket_data[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.c:2563: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(inpacket + 2, packet, len);
data/smartdns-33+dfsg/src/dns_client.c:2594: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 inpacket_data[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.c:2606: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(inpacket + 2, packet, len);
data/smartdns-33+dfsg/src/dns_client.c:2639: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 inpacket_data[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.c:2657: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(inpacket + http_len, packet, len);
data/smartdns-33+dfsg/src/dns_client.c:2782: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(ecs.addr, client.ecs_ipv4.ipv4_addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_client.c:2789: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(ecs.addr, client.ecs_ipv6.ipv6_addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_client.c:2797: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 packet_buff[DNS_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.c:2798: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 inpacket[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_client.h:69: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 spki[DNS_SERVER_SPKI_LEN];
data/smartdns-33+dfsg/src/dns_client.h:71:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.h:72: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 tls_host_verify[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.h:77: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 spki[DNS_SERVER_SPKI_LEN];
data/smartdns-33+dfsg/src/dns_client.h: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 hostname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.h:80: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 httphost[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.h:81: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 path[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_client.h:82: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 tls_host_verify[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:57:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_server_name[DNS_MAX_SERVER_NAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:68:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_log_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.c:73:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_ca_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.c:74:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_ca_path[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.c:76:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_cache_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.c:82:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_audit_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.c:106:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 dns_conf_sni_proxy_ip[DNS_MAX_IPLEN];
data/smartdns-33+dfsg/src/dns_conf.c:143: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(domain, begin, len);
data/smartdns-33+dfsg/src/dns_conf.c:430: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 domain_key[DNS_MAX_CONF_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:492: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 domain_key[DNS_MAX_CONF_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:632: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 domain[DNS_MAX_CONF_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:654:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[MAX_IP_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:714: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(address_ipv4->ipv4_addr, &addr_in->sin_addr.s_addr, 4);
data/smartdns-33+dfsg/src/dns_conf.c:726: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(address_ipv4->ipv4_addr, addr_in6->sin6_addr.s6_addr + 12, 4);
data/smartdns-33+dfsg/src/dns_conf.c:734: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(address_ipv6->ipv6_addr, addr_in6->sin6_addr.s6_addr, 16);
data/smartdns-33+dfsg/src/dns_conf.c:762: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 domain[DNS_MAX_CONF_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:780: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 tmpbuff[DNS_MAX_OPT_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:813:12:  [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(port_str + 1);
data/smartdns-33+dfsg/src/dns_conf.c:841:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char mode[DNS_MAX_OPT_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:857: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 group_name[DNS_GROUP_NAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:1034: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 domain[DNS_MAX_CONF_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:1174:12:  [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).
		subnet = atoi(slash);
data/smartdns-33+dfsg/src/dns_conf.c:1233: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 domain[DNS_MAX_CONF_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.c:1416: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 file_path[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.c:1417: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 file_path_dir[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.h:101:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char ipv4_addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:105: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 ipv6_addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:110:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ipsetname[DNS_MAX_IPSET_NAMELEN];
data/smartdns-33+dfsg/src/dns_conf.h:127:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char group_name[DNS_GROUP_NAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:133: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 order[DOMAIN_CHECK_NUM];
data/smartdns-33+dfsg/src/dns_conf.h:143:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char server[DNS_MAX_IPLEN];
data/smartdns-33+dfsg/src/dns_conf.h:150: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 spki[DNS_MAX_SPKI_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:151:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:152: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 httphost[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:153: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 tls_host_verify[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:154: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 path[DNS_MAX_URL_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:162: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 ipv4_addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:163: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_addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:164: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 addr[0];
data/smartdns-33+dfsg/src/dns_conf.h:184:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_IPLEN];
data/smartdns-33+dfsg/src/dns_conf.h:196:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_IPLEN];
data/smartdns-33+dfsg/src/dns_conf.h:213: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.
extern char dns_conf_log_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.h:217: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.
extern char dns_conf_ca_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.h:218: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.
extern char dns_conf_ca_path[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.h:220: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.
extern char dns_conf_cache_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.h:230: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.
extern char dns_conf_audit_file[DNS_MAX_PATH];
data/smartdns-33+dfsg/src/dns_conf.h:234: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.
extern char dns_conf_server_name[DNS_MAX_SERVER_NAME_LEN];
data/smartdns-33+dfsg/src/dns_conf.h:250: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.
extern char dns_conf_sni_proxy_ip[DNS_MAX_IPLEN];
data/smartdns-33+dfsg/src/dns_server.c:72:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char *key[DOMAIN_RULE_MAX];
data/smartdns-33+dfsg/src/dns_server.c:77: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[DNS_CONN_BUFF_SIZE];
data/smartdns-33+dfsg/src/dns_server.c:131: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 ipv4_addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns_server.c:132: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_addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns_server.c:133: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 addr[0];
data/smartdns-33+dfsg/src/dns_server.c:150: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:172:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:178: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 ipv4_addr[DNS_RR_A_LEN];
data/smartdns-33+dfsg/src/dns_server.c:183: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 ipv6_addr[DNS_RR_AAAA_LEN];
data/smartdns-33+dfsg/src/dns_server.c:305:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char req_host[MAX_IP_LEN];
data/smartdns-33+dfsg/src/dns_server.c:306:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char req_result[MAX_IP_LEN];
data/smartdns-33+dfsg/src/dns_server.c:307: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 req_time[MAX_IP_LEN];
data/smartdns-33+dfsg/src/dns_server.c:349: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 hostname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:447: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(tcpclient->sndbuff.buf + tcpclient->sndbuff.size, packet, len);
data/smartdns-33+dfsg/src/dns_server.c:462: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 inpacket_data[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_server.c:469: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(inpacket + 2, packet, len);
data/smartdns-33+dfsg/src/dns_server.c:526: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 inpacket[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_server.c:527: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 packet_buff[DNS_PACKSIZE];
data/smartdns-33+dfsg/src/dns_server.c:579:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:592:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:609: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(ip, "%d.%d.%d.%d", request->ipv4_addr[0], request->ipv4_addr[1], request->ipv4_addr[2],
data/smartdns-33+dfsg/src/dns_server.c:619: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(ip, "%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x", request->ipv6_addr[0],
data/smartdns-33+dfsg/src/dns_server.c:987: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(request->ipv4_addr, selected_addr_map->ipv4_addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_server.c:993: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(request->ipv6_addr, selected_addr_map->ipv6_addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_server.c:1130: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(request->ipv4_addr, &addr_in->sin_addr.s_addr, 4);
data/smartdns-33+dfsg/src/dns_server.c:1146: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(request->ipv4_addr, addr_in6->sin6_addr.s6_addr + 12, 4);
data/smartdns-33+dfsg/src/dns_server.c:1152: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(request->ipv6_addr, addr_in6->sin6_addr.s6_addr, 16);
data/smartdns-33+dfsg/src/dns_server.c:1190: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 tcp_ip[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1264: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(addr_map->addr, addr, addr_len);
data/smartdns-33+dfsg/src/dns_server.c:1340:49:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static int _dns_server_is_adblock_ipv6(unsigned char addr[16])
data/smartdns-33+dfsg/src/dns_server.c:1362: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 addr[4];
data/smartdns-33+dfsg/src/dns_server.c:1363:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1364:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1397: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(request->ipv4_addr, addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_server.c:1421:2:  [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(ip, "%d.%d.%d.%d", addr[0], addr[1], addr[2], addr[3]);
data/smartdns-33+dfsg/src/dns_server.c:1434: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 addr[16];
data/smartdns-33+dfsg/src/dns_server.c:1435:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1436:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1469: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(request->ipv6_addr, addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_server.c:1493:2:  [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(ip, "[%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x]", addr[0], addr[1], addr[2],
data/smartdns-33+dfsg/src/dns_server.c:1509:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1557: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 cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:1562: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 cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:1610:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1631: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 addr[4];
data/smartdns-33+dfsg/src/dns_server.c:1658: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 addr[16];
data/smartdns-33+dfsg/src/dns_server.c:1699:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1706: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 addr[4];
data/smartdns-33+dfsg/src/dns_server.c:1707: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 name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1715: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(request->ipv4_addr, addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_server.c:1721: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 addr[16];
data/smartdns-33+dfsg/src/dns_server.c:1722: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 name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1729: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(request->ipv6_addr, addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_server.c:1735: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 cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:1740: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 cname[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:1773:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:1802: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 addr[4];
data/smartdns-33+dfsg/src/dns_server.c:1819: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 addr[16];
data/smartdns-33+dfsg/src/dns_server.c:1949: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 reverse_addr[128] = {0};
data/smartdns-33+dfsg/src/dns_server.c:2032: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 rule_name[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:2103: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 domain_key[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:2105: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 matched_key[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:2137: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(matched_key, walk_args.key[i], walk_args.key_len[i]);
data/smartdns-33+dfsg/src/dns_server.c:2228: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(request->ipv4_addr, address_ipv4->ipv4_addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_server.c:2237: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(request->ipv6_addr, address_ipv6->ipv6_addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_server.c:2287: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(request->ipv4_addr, cache_addr->addr_data.ipv4_addr, DNS_RR_A_LEN);
data/smartdns-33+dfsg/src/dns_server.c:2292: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(request->ipv6_addr, cache_addr->addr_data.ipv6_addr, DNS_RR_AAAA_LEN);
data/smartdns-33+dfsg/src/dns_server.c:2337: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 packet_buff[DNS_PACKSIZE];
data/smartdns-33+dfsg/src/dns_server.c:2486: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(&request->in, from, from_len);
data/smartdns-33+dfsg/src/dns_server.c:2490: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(&request->in6, from, from_len);
data/smartdns-33+dfsg/src/dns_server.c:2663: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 packet_buff[DNS_PACKSIZE];
data/smartdns-33+dfsg/src/dns_server.c:2664:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:2665: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 domain[DNS_MAX_CNAME_LEN];
data/smartdns-33+dfsg/src/dns_server.c:2716: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(&request->localaddr, local, local_len);
data/smartdns-33+dfsg/src/dns_server.c:2799: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 inpacket[DNS_IN_PACKSIZE];
data/smartdns-33+dfsg/src/dns_server.c:2806: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 ans_data[4096];
data/smartdns-33+dfsg/src/dns_server.c:2887: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(&tcpclient->addr, &addr, addr_len);
data/smartdns-33+dfsg/src/dns_server.c:3119:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[DNS_MAX_CNAME_LEN] = {0};
data/smartdns-33+dfsg/src/dns_server.c:3136:4:  [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(ip, "%d.%d.%d.%d", addr_map->ipv4_addr[0], addr_map->ipv4_addr[1], addr_map->ipv4_addr[2],
data/smartdns-33+dfsg/src/dns_server.c:3144:4:  [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(ip, "[%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x:%.2x%.2x]",
data/smartdns-33+dfsg/src/dns_server.c:3380:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char port_str[8];
data/smartdns-33+dfsg/src/dns_server.c:3381:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip[MAX_IP_LEN];
data/smartdns-33+dfsg/src/fast_ping.c:101:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char host[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:454: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 ping_host_name[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:495: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 ping_host_name[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:542: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 ping_host_name[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:585:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char ping_host_name[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:916:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char port_str[MAX_IP_LEN];
data/smartdns-33+dfsg/src/fast_ping.c:951:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char port_str[MAX_IP_LEN];
data/smartdns-33+dfsg/src/fast_ping.c:1027:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char ip_str[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:1073: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(&ping_host->addr, gai->ai_addr, gai->ai_addrlen);
data/smartdns-33+dfsg/src/fast_ping.c:1249: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 ans_data[4096];
data/smartdns-33+dfsg/src/fast_ping.c:1270:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char name[PING_MAX_HOSTLEN];
data/smartdns-33+dfsg/src/fast_ping.c:1374: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 ans_data[4096];
data/smartdns-33+dfsg/src/http_parse.c:249:20:  [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).
	http_head->code = atol(ret_code);
data/smartdns-33+dfsg/src/http_parse.c:406: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).
						http_head->expect_data_len = atol(content_len);
data/smartdns-33+dfsg/src/http_parse.c:434:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buff_end, data, get_data_len);
data/smartdns-33+dfsg/src/include/art.h:63: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 partial[MAX_PREFIX_LEN];
data/smartdns-33+dfsg/src/include/art.h:71: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 keys[4];
data/smartdns-33+dfsg/src/include/art.h: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 keys[16];
data/smartdns-33+dfsg/src/include/art.h:90: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 keys[256];
data/smartdns-33+dfsg/src/include/art.h:109: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 key[0];
data/smartdns-33+dfsg/src/lib/art.c:399: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(l->key, key, key_len);
data/smartdns-33+dfsg/src/lib/art.c:416: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(dest->partial, src->partial, min(MAX_PREFIX_LEN, src->partial_len));
data/smartdns-33+dfsg/src/lib/art.c:505: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(new_node->children, n->children,
data/smartdns-33+dfsg/src/lib/art.c:538: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(new_node->children, n->children,
data/smartdns-33+dfsg/src/lib/art.c:540: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(new_node->keys, n->keys,
data/smartdns-33+dfsg/src/lib/art.c:616: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(new_node->n.partial, key+depth, min(MAX_PREFIX_LEN, longest_prefix));
data/smartdns-33+dfsg/src/lib/art.c:637: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(new_node->n.partial, n->partial, min(MAX_PREFIX_LEN, prefix_diff));
data/smartdns-33+dfsg/src/lib/art.c:649:13:  [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(n->partial, l->key+depth+prefix_diff+1,
data/smartdns-33+dfsg/src/lib/art.c:748: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(new_node->keys, n->keys, 4);
data/smartdns-33+dfsg/src/lib/art.c:749: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(new_node->children, n->children, 4*sizeof(void*));
data/smartdns-33+dfsg/src/lib/art.c:772:17:  [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(n->n.partial+prefix, child->partial, sub_prefix);
data/smartdns-33+dfsg/src/lib/art.c:777:13:  [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(child->partial, n->n.partial, min(prefix, MAX_PREFIX_LEN));
data/smartdns-33+dfsg/src/lib/art.c:1020:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(key, leaf->key, len);
data/smartdns-33+dfsg/src/lib/conf.c:47: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).
	value = atoi(argv[1]);
data/smartdns-33+dfsg/src/lib/conf.c:115:8:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	num = atoi(value);
data/smartdns-33+dfsg/src/lib/conf.c:136: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 *argv[3] = {"reset", "", 0};
data/smartdns-33+dfsg/src/lib/conf.c:230: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_LEN];
data/smartdns-33+dfsg/src/lib/conf.c:231:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char key[MAX_KEY_LEN];
data/smartdns-33+dfsg/src/lib/conf.c:232: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 value[MAX_LINE_LEN];
data/smartdns-33+dfsg/src/lib/conf.c:236: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 *argv[1024];
data/smartdns-33+dfsg/src/lib/conf.c:245: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(file, "r");
data/smartdns-33+dfsg/src/lib/radix.c:112: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(&prefix->add.sin6, dest, 16);
data/smartdns-33+dfsg/src/lib/radix.c:120: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(&prefix->add.sin, dest, 4);
data/smartdns-33+dfsg/src/lib/radix.c:562: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 save[256], *cp, *ep;
data/smartdns-33+dfsg/src/lib/radix.c:576: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(save, string, slen);
data/smartdns-33+dfsg/src/lib/radix.c:669: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 addrbuf[128];
data/smartdns-33+dfsg/src/smartdns.c:75: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_ver[256] = {0};
data/smartdns-33+dfsg/src/smartdns.c:91:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char line[MAX_LINE_LEN];
data/smartdns-33+dfsg/src/smartdns.c:92:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char key[MAX_KEY_LEN];
data/smartdns-33+dfsg/src/smartdns.c:93: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 value[MAX_LINE_LEN];
data/smartdns-33+dfsg/src/smartdns.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 ns_ip[DNS_MAX_IPLEN];
data/smartdns-33+dfsg/src/smartdns.c:101: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(RESOLVE_FILE, "r");
data/smartdns-33+dfsg/src/smartdns.c:393: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 config_file[MAX_LINE_LEN];
data/smartdns-33+dfsg/src/smartdns.c:394:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char pid_file[MAX_LINE_LEN];
data/smartdns-33+dfsg/src/tlog.c:57: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 logdir[PATH_MAX];
data/smartdns-33+dfsg/src/tlog.c:58: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 logname[TLOG_LOG_NAME_LEN];
data/smartdns-33+dfsg/src/tlog.c:59: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 suffix[TLOG_LOG_NAME_LEN];
data/smartdns-33+dfsg/src/tlog.c:99: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 data[0];
data/smartdns-33+dfsg/src/tlog.c:105: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 data[0];
data/smartdns-33+dfsg/src/tlog.c:109: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 name[TLOG_LOG_NAME_LEN];
data/smartdns-33+dfsg/src/tlog.c:162: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 path_c[PATH_MAX];
data/smartdns-33+dfsg/src/tlog.c:453:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buff[TLOG_MAX_LINE_LEN];
data/smartdns-33+dfsg/src/tlog.c:523: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(segment_head->data, buff, len);
data/smartdns-33+dfsg/src/tlog.c:530: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(log->buff + log->end, buff, len);
data/smartdns-33+dfsg/src/tlog.c:567: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 log_buf[TLOG_MAX_LINE_LEN];
data/smartdns-33+dfsg/src/tlog.c:638: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 archive_file[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:701: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 logname[TLOG_LOG_NAME_LEN * 2];
data/smartdns-33+dfsg/src/tlog.c:721: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 filename[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:724: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 logname[TLOG_LOG_NAME_LEN * 2];
data/smartdns-33+dfsg/src/tlog.c:766: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 filename[PATH_MAX * 2];
data/smartdns-33+dfsg/src/tlog.c:798: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 lock_file[PATH_MAX * 2];
data/smartdns-33+dfsg/src/tlog.c:811: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 lock_file[PATH_MAX * 2];
data/smartdns-33+dfsg/src/tlog.c:819:10:  [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(lock_file, O_RDWR | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR);
data/smartdns-33+dfsg/src/tlog.c:854: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 gzip_file[PATH_MAX * 2];
data/smartdns-33+dfsg/src/tlog.c:888: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 path_name[PATH_MAX];
data/smartdns-33+dfsg/src/tlog.c:902: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).
        int fd = atoi(ent->d_name);
data/smartdns-33+dfsg/src/tlog.c:933: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 gzip_file[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:934: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 gzip_cmd[PATH_MAX * 2];
data/smartdns-33+dfsg/src/tlog.c:935: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 log_file[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:936: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 pending_file[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:964:19:  [2] (race) vfork:
  On some old systems, vfork() permits race conditions, and it's very
  difficult to use correctly (CWE-362). Use fork() instead.
        int pid = vfork();
data/smartdns-33+dfsg/src/tlog.c:984: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 log_file[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:985: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 pending_file[TLOG_BUFF_LEN];
data/smartdns-33+dfsg/src/tlog.c:1068: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 logfile[PATH_MAX * 2];
data/smartdns-33+dfsg/src/tlog.c:1075:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        log->fd = open(logfile, O_APPEND | O_CREAT | O_WRONLY | O_CLOEXEC, 0640);
data/smartdns-33+dfsg/src/tlog.c:1313: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 dropmsg[TLOG_TMP_LEN];
data/smartdns-33+dfsg/src/tlog.c:1524: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 log_file[PATH_MAX];
data/smartdns-33+dfsg/src/util.c:152: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(addr, result->ai_addr, result->ai_addrlen);
data/smartdns-33+dfsg/src/util.c:179: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(addr, addr_in, sizeof(struct sockaddr_in));
data/smartdns-33+dfsg/src/util.c:191: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(addr, &addr_in4, sizeof(struct sockaddr_in));
data/smartdns-33+dfsg/src/util.c:195: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(addr, addr_in6, sizeof(struct sockaddr_in6));
data/smartdns-33+dfsg/src/util.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(&addr_in->sin_addr.s_addr, ip, ip_len);
data/smartdns-33+dfsg/src/util.c:227: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(addr_in6->sin6_addr.s6_addr, ip, ip_len);
data/smartdns-33+dfsg/src/util.c:249: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(ip, value + 1, offset);
data/smartdns-33+dfsg/src/util.c:270: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, value, offset);
data/smartdns-33+dfsg/src/util.c:277: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(colon);
data/smartdns-33+dfsg/src/util.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 host_name[PATH_MAX];
data/smartdns-33+dfsg/src/util.c:394: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(scheme, value, field_len);
data/smartdns-33+dfsg/src/util.c:413:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(host_name, process_ptr, field_len);
data/smartdns-33+dfsg/src/util.c:478: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((void *)attr + NETLINK_ALIGN(sizeof(struct ipset_netlink_attr)), data, len);
data/smartdns-33+dfsg/src/util.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 buffer[BUFF_SZ];
data/smartdns-33+dfsg/src/util.c:608: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.
	static unsigned char m[SHA256_DIGEST_LENGTH];
data/smartdns-33+dfsg/src/util.c:647: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 buff[TMP_BUFF_LEN_32];
data/smartdns-33+dfsg/src/util.c:650: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(pid_file, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
data/smartdns-33+dfsg/src/util.c:934: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_month[5];
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:45: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).
	for( pos = 0; (pos < strlen(src)) && (pos < len); pos++ )
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:82: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).
	return (off > -1) ? strlen(dest) : -1;
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:197: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(key) > 0 && strlen(val) > 0 )
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:197: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).
			if( strlen(key) > 0 && strlen(val) > 0 )
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:199: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).
				key_id = sfh_hash(key, strlen(key));
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:200: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).
				val_id = sfh_hash(val, strlen(val));
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:214: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).
					entry->length = strlen(val);
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:216: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).
					length = strlen(val) + ((4 - (strlen(val) % 4)) % 4);
data/smartdns-33+dfsg/package/luci-compat/tool/po2lmo/src/po2lmo.c:216: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).
					length = strlen(val) + ((4 - (strlen(val) % 4)) % 4);
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:45: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).
	for( pos = 0; (pos < strlen(src)) && (pos < len); pos++ )
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:82: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).
	return (off > -1) ? strlen(dest) : -1;
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:197: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(key) > 0 && strlen(val) > 0 )
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:197: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).
			if( strlen(key) > 0 && strlen(val) > 0 )
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:199: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).
				key_id = sfh_hash(key, strlen(key));
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:200: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).
				val_id = sfh_hash(val, strlen(val));
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:214: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).
					entry->length = strlen(val);
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:216: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).
					length = strlen(val) + ((4 - (strlen(val) % 4)) % 4);
data/smartdns-33+dfsg/package/luci/tool/po2lmo/src/po2lmo.c:216: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).
					length = strlen(val) + ((4 - (strlen(val) % 4)) % 4);
data/smartdns-33+dfsg/src/dns.c:1996:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(fd, data, 1024);
data/smartdns-33+dfsg/src/dns_cache.c:505:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(fd, &cache_record, sizeof(cache_record));
data/smartdns-33+dfsg/src/dns_cache.c:522:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(fd, &data_head, sizeof(data_head));
data/smartdns-33+dfsg/src/dns_cache.c:540:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(fd, cache_data->data, data_head.size);
data/smartdns-33+dfsg/src/dns_cache.c:573:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, &cache_file, sizeof(cache_file));
data/smartdns-33+dfsg/src/dns_client.c:3146:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(100000);
data/smartdns-33+dfsg/src/dns_conf.c:434: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(domain);
data/smartdns-33+dfsg/src/dns_conf.c:495: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(domain);
data/smartdns-33+dfsg/src/dns_server.c:2113: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).
	domain_len = strlen(request->domain);
data/smartdns-33+dfsg/src/dns_server.c:3305:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(100000);
data/smartdns-33+dfsg/src/fast_ping.c:1602:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(100000);
data/smartdns-33+dfsg/src/include/stringutil.h:31:14:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	char *ret = strncpy(dest, src, n - 1);
data/smartdns-33+dfsg/src/lib/conf.c:68:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(item_string->data, argv[1], item_string->size);
data/smartdns-33+dfsg/src/lib/conf.c:253:15:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		filed_num = sscanf(line, "%63s %1023[^\r\n]s", key, value);
data/smartdns-33+dfsg/src/lib/radix.c:572: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).
	if ((slen = strlen(string) + 1) > sizeof(save)) {
data/smartdns-33+dfsg/src/smartdns.c:109:15:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		filed_num = sscanf(line, "%63s %1023[^\r\n]s", key, value);
data/smartdns-33+dfsg/src/smartdns.c:450:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(100000);
data/smartdns-33+dfsg/src/tlog.c:174:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(path_c, path, sizeof(path_c) - 1);
data/smartdns-33+dfsg/src/tlog.c:473:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(buff, "[LOG TOO LONG, DISCARD]\n", sizeof(buff));
data/smartdns-33+dfsg/src/tlog.c:746:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(oldestlog->name, entry->d_name, sizeof(oldestlog->name) - 1);
data/smartdns-33+dfsg/src/tlog.c:1049: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).
            unused = write(log->fd, msg, strlen(msg));
data/smartdns-33+dfsg/src/tlog.c:1557:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(log_file, logfile, sizeof(log_file) - 1);
data/smartdns-33+dfsg/src/tlog.c:1559:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(log->logdir, dirname(log_file), sizeof(log->logdir));
data/smartdns-33+dfsg/src/tlog.c:1561:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(log_file, logfile, PATH_MAX);
data/smartdns-33+dfsg/src/tlog.c:1563:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(log->logname, basename(log_file), sizeof(log->logname));
data/smartdns-33+dfsg/src/tlog.c:1566:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(log->suffix, TLOG_SUFFIX_LOG, sizeof(log->suffix));
data/smartdns-33+dfsg/src/tlog.c:1568:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(log->suffix, TLOG_SUFFIX_GZ, sizeof(log->suffix));
data/smartdns-33+dfsg/src/util.c:258:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ip, value, MAX_IP_LEN);
data/smartdns-33+dfsg/src/util.c:265:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(ip, value, MAX_IP_LEN);
data/smartdns-33+dfsg/src/util.c:423:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(path, process_ptr, PATH_MAX);
data/smartdns-33+dfsg/src/util.c:536: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(ipsetname) >= IPSET_MAXNAMELEN) {
data/smartdns-33+dfsg/src/util.c:556:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	_ipset_add_attr(netlink_head, IPSET_ATTR_SETNAME, strlen(ipsetname) + 1, ipsetname);
data/smartdns-33+dfsg/src/util.c:621: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).
	size_t inlen = strlen(in);
data/smartdns-33+dfsg/src/util.c:913:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(hostname, data + pos + 3, len);
data/smartdns-33+dfsg/src/util.c:939:2:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
	sscanf(__DATE__, "%5s %d %d", s_month, &day, &year);

ANALYSIS SUMMARY:

Hits = 453
Lines analyzed = 25126 in approximately 0.58 seconds (43617 lines/second)
Physical Source Lines of Code (SLOC) = 18398
Hits@level = [0]  84 [1]  53 [2] 378 [3]   2 [4]  20 [5]   0
Hits@level+ = [0+] 537 [1+] 453 [2+] 400 [3+]  22 [4+]  20 [5+]   0
Hits/KSLOC@level+ = [0+] 29.188 [1+] 24.6222 [2+] 21.7415 [3+] 1.19578 [4+] 1.08707 [5+]   0
Dot directories skipped = 2 (--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.