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/maradns-2.0.13/dns/Compress_rrs.h
Examining data/maradns-2.0.13/dns/Compress.c
Examining data/maradns-2.0.13/dns/Compress_rrdescs.h
Examining data/maradns-2.0.13/dns/Queries.c
Examining data/maradns-2.0.13/dns/Decompress.c
Examining data/maradns-2.0.13/dns/bobbit.c
Examining data/maradns-2.0.13/dns/functions_dns.h
Examining data/maradns-2.0.13/sqa/sendudp.c
Examining data/maradns-2.0.13/sqa/qr.test.c
Examining data/maradns-2.0.13/sqa/asktest.c
Examining data/maradns-2.0.13/sqa/sendnoise.c
Examining data/maradns-2.0.13/sqa/dead_host_simulate.c
Examining data/maradns-2.0.13/sqa/aaaatest.c
Examining data/maradns-2.0.13/sqa/sendtcp.c
Examining data/maradns-2.0.13/sqa/old/old-tests/test_getzone.c
Examining data/maradns-2.0.13/sqa/old/old-tests/ipacltest.c
Examining data/maradns-2.0.13/sqa/old/old-tests/compress.test.c
Examining data/maradns-2.0.13/sqa/old/old-tests/show.charnum.c
Examining data/maradns-2.0.13/sqa/old/old-tests/test_zoneserver.c
Examining data/maradns-2.0.13/sqa/old/old-tests/cst.c
Examining data/maradns-2.0.13/sqa/old/old-tests/timestamp.c
Examining data/maradns-2.0.13/sqa/old/old-tests/duende-test.c
Examining data/maradns-2.0.13/sqa/old/old-tests/compress_new.test.c
Examining data/maradns-2.0.13/sqa/old/old-tests/rngtest.c
Examining data/maradns-2.0.13/sqa/old/old-tests/csv1test.c
Examining data/maradns-2.0.13/sqa/old/old-tests/rtest.c
Examining data/maradns-2.0.13/sqa/old/old-tests/setgroupstest.c
Examining data/maradns-2.0.13/sqa/regressions/noise/sendnoise.c
Examining data/maradns-2.0.13/sqa/regressions/predator2/sendp2.c
Examining data/maradns-2.0.13/sqa/regressions/askmara.bug/bad.packet.c
Examining data/maradns-2.0.13/sqa/regressions/bad_query/check_bad_query.c
Examining data/maradns-2.0.13/sqa/regressions/predator1/sendp1.c
Examining data/maradns-2.0.13/MaraDns.h
Examining data/maradns-2.0.13/utf8/utf8tol1.c
Examining data/maradns-2.0.13/utf8/l1toutf8.c
Examining data/maradns-2.0.13/utf8/lcol.c
Examining data/maradns-2.0.13/utf8/utf8test.c
Examining data/maradns-2.0.13/utf8/Utf8.c
Examining data/maradns-2.0.13/qual/qual_timestamp.c
Examining data/maradns-2.0.13/qual/qual_timestamp.h
Examining data/maradns-2.0.13/parse/ParseCsv1.c
Examining data/maradns-2.0.13/parse/parsetest.c
Examining data/maradns-2.0.13/parse/Csv2_rr_aaaa.c
Examining data/maradns-2.0.13/parse/parsetest2.c
Examining data/maradns-2.0.13/parse/Csv2_read.h
Examining data/maradns-2.0.13/parse/Csv2_rr_a.c
Examining data/maradns-2.0.13/parse/Csv2_rr_soa.c
Examining data/maradns-2.0.13/parse/Parse_ipv6_functions.h
Examining data/maradns-2.0.13/parse/functions_parse.h
Examining data/maradns-2.0.13/parse/Csv2_parse.c
Examining data/maradns-2.0.13/parse/Csv2_database.h
Examining data/maradns-2.0.13/parse/ParseCsv1_en.h
Examining data/maradns-2.0.13/parse/Csv2_database.c
Examining data/maradns-2.0.13/parse/Csv2_esc_txt.c
Examining data/maradns-2.0.13/parse/Csv2_main.c
Examining data/maradns-2.0.13/parse/Parse_ipv6.c
Examining data/maradns-2.0.13/parse/Csv2_functions.h
Examining data/maradns-2.0.13/parse/Csv2_rr_wks.c
Examining data/maradns-2.0.13/parse/Csv2_rr_txt.c
Examining data/maradns-2.0.13/parse/ParseIpAcl.c
Examining data/maradns-2.0.13/parse/Csv2_read.c
Examining data/maradns-2.0.13/parse/ParseMaraRc_en.h
Examining data/maradns-2.0.13/parse/ParseMaraRc.c
Examining data/maradns-2.0.13/tools/duende-ng.c
Examining data/maradns-2.0.13/tools/mkSecretTxt.c
Examining data/maradns-2.0.13/tools/askmara.c
Examining data/maradns-2.0.13/tools/misc/rg32hash.c
Examining data/maradns-2.0.13/tools/misc/mqhash.c
Examining data/maradns-2.0.13/tools/misc/rnghash.c
Examining data/maradns-2.0.13/tools/misc/microdns.c
Examining data/maradns-2.0.13/tools/strip.control.c
Examining data/maradns-2.0.13/tools/benchmark.c
Examining data/maradns-2.0.13/tools/duende.c
Examining data/maradns-2.0.13/tools/askmara_labels_en.h
Examining data/maradns-2.0.13/tools/askmara-tcp.c
Examining data/maradns-2.0.13/tcp/getzone_pt_br.h
Examining data/maradns-2.0.13/tcp/libtcp.c
Examining data/maradns-2.0.13/tcp/getzone_de.h
Examining data/maradns-2.0.13/tcp/zoneserver_pt_br.h
Examining data/maradns-2.0.13/tcp/getzone.c
Examining data/maradns-2.0.13/tcp/fetchzone.c
Examining data/maradns-2.0.13/tcp/getzone_es.h
Examining data/maradns-2.0.13/tcp/getzone_en.h
Examining data/maradns-2.0.13/tcp/functions_tcp.h
Examining data/maradns-2.0.13/tcp/zoneserver_en.h
Examining data/maradns-2.0.13/tcp/zoneserver.c
Examining data/maradns-2.0.13/server/MaraAnyChain.c
Examining data/maradns-2.0.13/server/MaraBigHash_en.h
Examining data/maradns-2.0.13/server/MaraBigHash_de.h
Examining data/maradns-2.0.13/server/MaraBigHash_pt_br.h
Examining data/maradns-2.0.13/server/read_kvars.h
Examining data/maradns-2.0.13/server/udpsuccess.c
Examining data/maradns-2.0.13/server/timestamp.h
Examining data/maradns-2.0.13/server/MaraBigHash_es.h
Examining data/maradns-2.0.13/server/timestamp.c
Examining data/maradns-2.0.13/server/MaraDNS_de.h
Examining data/maradns-2.0.13/server/read_kvars.c
Examining data/maradns-2.0.13/server/MaraDNS_pt_br.h
Examining data/maradns-2.0.13/server/MaraBigHash.c
Examining data/maradns-2.0.13/server/simple.c
Examining data/maradns-2.0.13/server/functions_server.h
Examining data/maradns-2.0.13/server/MaraDNS.c
Examining data/maradns-2.0.13/server/MaraDNS_en.h
Examining data/maradns-2.0.13/rng/rng-api-fst.c
Examining data/maradns-2.0.13/rng/rng-32bit-tables.h
Examining data/maradns-2.0.13/rng/rng-api-fst.h
Examining data/maradns-2.0.13/rng/make_32bit_tables.c
Examining data/maradns-2.0.13/rng/rng-alg-fst.c
Examining data/maradns-2.0.13/rng/rng-alg-fst.h
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering/send_packet_stdin.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering/show_packet_stdout.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering/truncated.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_roy_arends/sendpacket-arends.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_num_retries/simple.dns.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering_2/send_packet_stdin.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering_2/show_packet_stdout.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering_2/truncated.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_easydns_bad_truncation/simulate_easydns.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_ttl_expire/microdns-timestamp.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_root_upstream/microdns_rd_must_be_clear.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_root_upstream/microdns_rd_must_be_set.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_incomplete_last_line/incomplete.last.line.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_server_fail/microdns_server_fail.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_server_fail/microdns.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_max_inflights/microdns_delay.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_badid_question/badquestion.dns.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_badid_question/badid.dns.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_bigpacket/send_packet_stdin.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_bigpacket/show_packet_stdout.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_bigpacket/truncated.c
Examining data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_resurrections/dead.server.c
Examining data/maradns-2.0.13/deadwood-3.2.09/tools/duende.c
Examining data/maradns-2.0.13/deadwood-3.2.09/tools/mkSecretTxt.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwDnsStr.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwStr.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwRecurse.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwRadioGatun.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/Test.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwDict.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwDnsStr.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwStr_functions.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwStr.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/make.version.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwRecurse.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/version.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwWinSvc.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwCompress.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwRadioGatun.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwCompress.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwRandPrime.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwDict.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwMain.c
Examining data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h
Examining data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c
Examining data/maradns-2.0.13/libs/JsStr.c
Examining data/maradns-2.0.13/libs/MaraHash.h
Examining data/maradns-2.0.13/libs/MaraHash.c
Examining data/maradns-2.0.13/libs/JsStr.h
Examining data/maradns-2.0.13/libs/mtest.c
Examining data/maradns-2.0.13/libs/tests.c
Examining data/maradns-2.0.13/libs/JsStrCP.c
Examining data/maradns-2.0.13/libs/JsStrOS.c
Examining data/maradns-2.0.13/libs/functions_MaraHash.h
Examining data/maradns-2.0.13/build/copy.devs.c
Examining data/maradns-2.0.13/debian/DwRandPrime.h

FINAL RESULTS:

data/maradns-2.0.13/deadwood-3.2.09/src/DwRecurse.h:104:15:  [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.
#define dw_px printf
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:117:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        printf(HEADER,candidate);
data/maradns-2.0.13/deadwood-3.2.09/tools/duende.c:227:13:  [4] (shell) execvp:
  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.
            execvp(argv[exec_argv_offset],argv + exec_argv_offset);
data/maradns-2.0.13/server/MaraDNS.c:3760:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        printf(
data/maradns-2.0.13/server/MaraDNS.c:4117:21:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
                    printf(L_ERROR_VALUE); /* "Error value (for software devlopers): " */
data/maradns-2.0.13/sqa/old/old-tests/setgroupstest.c:31:9:  [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",NULL);
data/maradns-2.0.13/tools/duende-ng.c:328:13:  [4] (shell) execvp:
  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.
            execvp(arguments.argv[0],arguments.argv);
data/maradns-2.0.13/tools/duende.c:305:13:  [4] (shell) execvp:
  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.
            execvp(arguments.argv[0],arguments.argv);
data/maradns-2.0.13/tools/misc/rg32hash.c:597:13:  [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(path,f->d_name);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:707:12:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        if(chroot((char *)c) == -1) {
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:83:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate = random();
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:87:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() << 16);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:88:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() && 0xFFFF);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:90:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() << 16);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:91:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() && 0xFFFF);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:93:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() << 16);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:94:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() && 0xFFFF);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:96:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() << 16);
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:97:17:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		candidate ^= (random() && 0xFFFF);
data/maradns-2.0.13/server/MaraDNS.c:4262:12:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        if(chroot((char *)stringbuffer_zt) != 0)
data/maradns-2.0.13/sqa/old/old-tests/timestamp.c:840:12:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        if(chroot(chroot_zt) != 0)
data/maradns-2.0.13/tcp/zoneserver.c:1177:12:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
        if(chroot((char *)chroot_zt) != 0)
data/maradns-2.0.13/tools/duende-ng.c:172:9:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if (chroot(arguments->duende_chroot) != 0) {
data/maradns-2.0.13/tools/duende.c:149:9:  [3] (misc) chroot:
  chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22).
  Make sure the program immediately chdir("/"), closes file descriptors, and
  drops root privileges, and that all necessary files (and no more!) are in
  the new root.
    if (chroot(arguments->duende_chroot) != 0) {
data/maradns-2.0.13/tools/misc/mqhash.c:347:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            if(strncpy(fp,getenv("HOME"),50) == NULL) {
data/maradns-2.0.13/tools/misc/mqhash.c:382:27:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            if(strncpy(fp,getenv("HOME"),50) == NULL) {
data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_max_inflights/microdns_delay.c:34: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_max_inflights/microdns_delay.c:115: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_num_retries/simple.dns.c:33: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_num_retries/simple.dns.c:39: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_resurrections/dead.server.c:32: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/dwood2rc_n_resurrections/dead.server.c:38: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_badid_question/badid.dns.c:33: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_badid_question/badid.dns.c:39: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_badid_question/badquestion.dns.c:33: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_badid_question/badquestion.dns.c:39: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_bigpacket/truncated.c:84: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_easydns_bad_truncation/simulate_easydns.c:34: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_easydns_bad_truncation/simulate_easydns.c:100: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_root_upstream/microdns_rd_must_be_clear.c:34: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_root_upstream/microdns_rd_must_be_clear.c:115: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_root_upstream/microdns_rd_must_be_set.c:34: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_root_upstream/microdns_rd_must_be_set.c:115: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_roy_arends/sendpacket-arends.c:35: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 p[PACKET_LEN] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_roy_arends/sendpacket-arends.c:101: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_server_fail/microdns.c:34: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_server_fail/microdns.c:115: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_server_fail/microdns_server_fail.c:93: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering/truncated.c:84: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering_2/truncated.c:84: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_ttl_expire/microdns-timestamp.c:35: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 p[17] =
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_ttl_expire/microdns-timestamp.c:118: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 in[512];
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:58:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        in = fopen("secret.txt","rb");
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:60:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        in = fopen("/dev/urandom","rb");
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:874:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        handle = fopen(filename,"wb");
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:1070:18:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        handle = fopen(filename,"rb");
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.c:774:16:  [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).
        look = fopen(name,"rb");
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h:89: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 *key_s_names[KEY_S_COUNT + 1] = {
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h:101: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 *key_d_names[KEY_D_COUNT + 1] = {
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h: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 *key_n_names[KEY_N_COUNT + 1] = {
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h:228: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 pattern[DWM_MAX_PATTERNS + 1];
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h:229: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 action[DWM_MAX_PATTERNS + 1];
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.h:230: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 newstate[DWM_MAX_PATTERNS + 1];
data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.c:162: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(&(dns_do->V4.sin_addr.s_addr), ip->ip, ip->len);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.c:168: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(&(dns_do->V6.sin6_addr), ip->ip, ip->len);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.c:356:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        n = atoi(q);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.c:434: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(from_ip->ip,&(client->V4.sin_addr.s_addr),4);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSocket.c:441: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(from_ip->ip, &(client->V6.sin6_addr),16);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:60: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 d[256];
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:61: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 h[256];
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:75:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        LOG = fopen("dwlog.txt","ab");
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:617:29:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                filename = (char *)dw_to_cstr(key_s[DWM_S_random_seed_file]);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:621:16:  [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).
        seed = open(filename, O_RDONLY);
data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.c:128: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(&(server->V4.sin_addr),rem_ip.ip,4);
data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.c:134: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(&(server->V6.sin6_addr),rem_ip.ip,16);
data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.c:211: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(tcp_pend[b].buffer + tcp_pend[b].got, buffer, len);
data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.c:306: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(tcp_pend[b].buffer + 2, packet, len);
data/maradns-2.0.13/deadwood-3.2.09/src/DwTcpSocket.c:388: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(tcp_pend[b].buffer + 2, tmp->str, tmp->len); /* DNS query */
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:162: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(&(server->V4.sin_addr),addr->ip,4);
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:168: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(&(server->V6.sin6_addr),addr->ip,16);
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:664:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char packet[522];
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:792: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(&client.V4.sin_addr, r_ip->local[local_num]->ip.ip, 4);
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:798: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(&client.V6.sin6_addr, r_ip->local[local_num]->ip.ip,
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:931:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char not_there[41] =
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:1075: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(&client.V4.sin_addr, rem[b].local[l]->ip.ip, 4);
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:1080: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(&client.V6.sin6_addr, rem[b].local[l]->ip.ip,
data/maradns-2.0.13/deadwood-3.2.09/src/DwUdpSocket.c:1239:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char a[520];
data/maradns-2.0.13/deadwood-3.2.09/src/DwWinSvc.c:70: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 szPath[512], svcbinary[550];
data/maradns-2.0.13/deadwood-3.2.09/src/DwWinSvc.c:150: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 szPath[512];
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:78:16:  [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).
        rand = fopen("/dev/urandom","rb");
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:80: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 rndtab[256];
data/maradns-2.0.13/deadwood-3.2.09/tools/duende.c:72: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 out_buf[1024];
data/maradns-2.0.13/deadwood-3.2.09/tools/duende.c:187:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp_pid = fopen(argv[1] + 6,"w");
data/maradns-2.0.13/deadwood-3.2.09/tools/mkSecretTxt.c:33:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out = fopen("secret.txt","rb");
data/maradns-2.0.13/deadwood-3.2.09/tools/mkSecretTxt.c:39:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out = fopen("secret.txt","wb");
data/maradns-2.0.13/dns/Compress_rrdescs.h:40: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 *rr_descs[RR_COUNT] = {
data/maradns-2.0.13/libs/JsStrOS.c:482: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 temp[256];
data/maradns-2.0.13/libs/JsStrOS.c:497:23:  [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).
    desc->file_desc = open(temp,flags,00600);
data/maradns-2.0.13/libs/MaraHash.c:696:16:  [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).
        read = fopen(filename,"rb");
data/maradns-2.0.13/libs/mtest.c:16: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 strn[256];
data/maradns-2.0.13/libs/mtest.c:34: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).
    if(atoi(strn) >= 8 && atoi(strn) < 31)
data/maradns-2.0.13/libs/mtest.c:34:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if(atoi(strn) >= 8 && atoi(strn) < 31)
data/maradns-2.0.13/libs/mtest.c:35:38:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        dict = (mhash *)mhash_create(atoi(strn));
data/maradns-2.0.13/libs/mtest.c:74:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if(atoi(strn) >= 8 && atoi(strn) < 31)
data/maradns-2.0.13/libs/mtest.c:74:35:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            if(atoi(strn) >= 8 && atoi(strn) < 31)
data/maradns-2.0.13/libs/mtest.c:75:45:  [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).
                see_ret = mhash_resize(dict,atoi(strn));
data/maradns-2.0.13/libs/mtest.c:77:45:  [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).
                see_ret = mhash_resize(dict,atoi(strn));
data/maradns-2.0.13/libs/tests.c:14: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 strn[256];
data/maradns-2.0.13/parse/Csv2_database.c:190: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 name[256];
data/maradns-2.0.13/parse/Csv2_main.c:120:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        if(memcpy(out,in,sizeof(q_header)) == 0) {
data/maradns-2.0.13/parse/Csv2_main.c:175:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char len[3];
data/maradns-2.0.13/parse/Csv2_main.c:478:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                unsigned char get[3];
data/maradns-2.0.13/parse/Csv2_read.c:85: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((out->reading = fopen(out->filename,"rb")) == 0) {
data/maradns-2.0.13/parse/Csv2_read.c:339:19:  [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((nfd = fopen(nf,"rb")) == 0) {
data/maradns-2.0.13/parse/Csv2_read.h:34: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 context[19];
data/maradns-2.0.13/parse/ParseMaraRc.c:36: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 *keywords[KEYCOUNT] = {
data/maradns-2.0.13/parse/ParseMaraRc.c:344: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 *dkeywords[DKEYCOUNT] = {
data/maradns-2.0.13/rng/make_32bit_tables.c: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 rbox[16] = {0x7,0xc,0xb,0xd,0xe,0x4,0x9,0xf,
data/maradns-2.0.13/rng/make_32bit_tables.c:71: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 ebox[16],iebox[16];
data/maradns-2.0.13/rng/rng-alg-fst.c:63:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char Sc[256];
data/maradns-2.0.13/rng/rng-alg-fst.c:88:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char rbytes[512];
data/maradns-2.0.13/rng/rng-api-fst.c:91: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(key->keyMaterial, keyMaterial, keyLen/8);
data/maradns-2.0.13/rng/rng-api-fst.h:97: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  keyMaterial[MAX_KEY_SIZE+1];  /* Raw key data in ASCII, e.g., user input or KAT values */
data/maradns-2.0.13/server/MaraBigHash.c:1037: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 ip[4], length, val;
data/maradns-2.0.13/server/MaraDNS.c:218: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 hostname[INET6_ADDRSTRLEN];
data/maradns-2.0.13/server/MaraDNS.c:2204: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 ip[4];
data/maradns-2.0.13/server/MaraDNS.c:3427: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 ascii_ipv6[128];
data/maradns-2.0.13/server/MaraDNS.c:3700: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 stringbuffer_zt[255];
data/maradns-2.0.13/server/simple.c:107: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 ascii_ipv6[128];
data/maradns-2.0.13/server/simple.c:303: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 chroot_zt[255];
data/maradns-2.0.13/server/timestamp.c:70: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 *dow[7] = {
data/maradns-2.0.13/server/timestamp.c:78: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 *moy[12] = {
data/maradns-2.0.13/server/timestamp.c:110: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 ct[256];
data/maradns-2.0.13/sqa/aaaatest.c:49: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 crypto_key[34];
data/maradns-2.0.13/sqa/asktest.c:51: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 crypto_key[34];
data/maradns-2.0.13/sqa/old/old-tests/show.charnum.c:25:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if((f=fopen("example.uncompressed","rb")) == NULL)
data/maradns-2.0.13/sqa/old/old-tests/test_getzone.c:134: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 len[2];
data/maradns-2.0.13/sqa/old/old-tests/test_getzone.c:144:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if(argc == 4 && atoi(argv[3]) == 255)
data/maradns-2.0.13/sqa/old/old-tests/test_zoneserver.c:270:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 getline[BUFSIZE];
data/maradns-2.0.13/sqa/old/old-tests/test_zoneserver.c:271:22:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 get[2];
data/maradns-2.0.13/sqa/old/old-tests/test_zoneserver.c:291:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if((in = fopen("test_zonedata.txt","rb")) == NULL) {
data/maradns-2.0.13/sqa/old/old-tests/timestamp.c:353: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 ip[4];
data/maradns-2.0.13/sqa/old/old-tests/timestamp.c:616: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 ip[64];
data/maradns-2.0.13/sqa/old/old-tests/timestamp.c:694: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 chroot_zt[255];
data/maradns-2.0.13/sqa/qr.test.c:49: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 crypto_key[34];
data/maradns-2.0.13/sqa/regressions/askmara.bug/bad.packet.c:28: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 p[496] =
data/maradns-2.0.13/sqa/regressions/askmara.bug/bad.packet.c:66: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 in[512];
data/maradns-2.0.13/sqa/regressions/bad_query/check_bad_query.c:98: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 crypto_key[34];
data/maradns-2.0.13/sqa/regressions/bad_query/check_bad_query.c:201:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
         timeout = atoi(argv[2 + nrd]);
data/maradns-2.0.13/sqa/regressions/noise/sendnoise.c:47:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char crypto_key[34];
data/maradns-2.0.13/sqa/regressions/predator1/sendp1.c:50: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 crypto_key[34];
data/maradns-2.0.13/sqa/regressions/predator2/sendp2.c:50: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 crypto_key[34];
data/maradns-2.0.13/sqa/sendnoise.c:47:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
unsigned char crypto_key[34];
data/maradns-2.0.13/sqa/sendtcp.c:35: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 crypto_key[34];
data/maradns-2.0.13/sqa/sendtcp.c:87: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 len[2]; /* Two-byte TCP length header */
data/maradns-2.0.13/sqa/sendudp.c:50: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 crypto_key[34];
data/maradns-2.0.13/tcp/fetchzone.c:76: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 len[2];
data/maradns-2.0.13/tcp/fetchzone.c:86:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if(argc == 4 && atoi(argv[3]) == 255)
data/maradns-2.0.13/tcp/getzone.c:68: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 len[2];
data/maradns-2.0.13/tcp/getzone.c:78:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    if(argc == 4 && atoi(argv[3]) == 255)
data/maradns-2.0.13/tcp/zoneserver.c:140: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 prng_seed[34];
data/maradns-2.0.13/tcp/zoneserver.c:143: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[MAXPATHLEN + 2];
data/maradns-2.0.13/tcp/zoneserver.c:190:20:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if((desc = open(path,O_RDONLY)) == -1) {
data/maradns-2.0.13/tcp/zoneserver.c:418: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 get[2];
data/maradns-2.0.13/tcp/zoneserver.c:610: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 get[2];
data/maradns-2.0.13/tcp/zoneserver.c:1024: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 chroot_zt[255];
data/maradns-2.0.13/tcp/zoneserver.c:1254:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                    char buf[1024];
data/maradns-2.0.13/tools/askmara-tcp.c:101: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 crypto_key[34];
data/maradns-2.0.13/tools/askmara-tcp.c:177: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 len[2];
data/maradns-2.0.13/tools/askmara-tcp.c:197:24:  [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).
            dns_port = atoi(*argv);
data/maradns-2.0.13/tools/askmara-tcp.c:208:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            timeout = atoi(*argv);
data/maradns-2.0.13/tools/askmara.c:100: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 crypto_key[34];
data/maradns-2.0.13/tools/askmara.c:207:24:  [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).
            dns_port = atoi(*argv);
data/maradns-2.0.13/tools/askmara.c:218:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            timeout = atoi(*argv);
data/maradns-2.0.13/tools/duende-ng.c:110:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            arguments->duende_uid = atoi(arg);
data/maradns-2.0.13/tools/duende-ng.c:113:42:  [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).
            arguments->restart_on_exit = atoi(arg);
data/maradns-2.0.13/tools/duende-ng.c:116:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            arguments->duende_gid = atoi(arg);
data/maradns-2.0.13/tools/duende-ng.c:154: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 out_buf[1024];
data/maradns-2.0.13/tools/duende-ng.c:288:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp_pid = fopen(arguments.duende_pid_file,"w");
data/maradns-2.0.13/tools/duende.c:87:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            arguments->duende_uid = atoi(arg);
data/maradns-2.0.13/tools/duende.c:90:42:  [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).
            arguments->restart_on_exit = atoi(arg);
data/maradns-2.0.13/tools/duende.c:93:37:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            arguments->duende_gid = atoi(arg);
data/maradns-2.0.13/tools/duende.c:131: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 out_buf[1024];
data/maradns-2.0.13/tools/duende.c:265:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE *fp_pid = fopen(arguments.duende_pid_file,"w");
data/maradns-2.0.13/tools/misc/microdns.c:34: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 p[17] =
data/maradns-2.0.13/tools/misc/microdns.c:115: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 in[512];
data/maradns-2.0.13/tools/misc/mqhash.c:303: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 state[HASH_BYTES + 1], input[HASH_BYTES + 1];
data/maradns-2.0.13/tools/misc/mqhash.c:307: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 copy[HASH_BYTES * 43];
data/maradns-2.0.13/tools/misc/mqhash.c:335:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            n = atoi(argv[2]);
data/maradns-2.0.13/tools/misc/mqhash.c:344: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.
            char fp[100];
data/maradns-2.0.13/tools/misc/mqhash.c:351:16:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            if(strcat(fp,"/.mhash_prefix") == NULL) {
data/maradns-2.0.13/tools/misc/mqhash.c:355:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if((sh = fopen(fp,"rb")) == NULL) {
data/maradns-2.0.13/tools/misc/mqhash.c:379: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.
            char fp[100];
data/maradns-2.0.13/tools/misc/mqhash.c:386:16:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
            if(strcat(fp,"/.mhash_prefix2") == NULL) {
data/maradns-2.0.13/tools/misc/mqhash.c:390:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            if((sh = fopen(fp,"rb")) == NULL) {
data/maradns-2.0.13/tools/misc/rg32hash.c:471: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 v[12];
data/maradns-2.0.13/tools/misc/rg32hash.c:475:20:  [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((desc = fopen(filename,"rb")) == NULL) {
data/maradns-2.0.13/tools/misc/rg32hash.c:576: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[PATH_MAX];
data/maradns-2.0.13/tools/misc/rnghash.c:45: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.
    static char bufr[BUF_MAX + 1];
data/maradns-2.0.13/tools/misc/rnghash.c:149: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 state[HASH_BYTES + 1], input[HASH_BYTES + 1];
data/maradns-2.0.13/tools/misc/rnghash.c:173:16:  [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((desc = open(argv[1],O_RDONLY)) < 0) {
data/maradns-2.0.13/tools/mkSecretTxt.c:33:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out = fopen("secret.txt","rb");
data/maradns-2.0.13/tools/mkSecretTxt.c:39:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        out = fopen("secret.txt","wb");
data/maradns-2.0.13/utf8/lcol.c:32:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        unsigned char p[BUFSIZE];
data/maradns-2.0.13/utf8/utf8test.c:26: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 strn[256];
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_bigpacket/send_packet_stdin.c:72:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((nib = (getc(stdin)))) {
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_bigpacket/show_packet_stdout.c:73:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((nib = (getc(stdin)))) {
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_incomplete_last_line/incomplete.last.line.c:9:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                a = getc(stdin);
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering/send_packet_stdin.c:72:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((nib = (getc(stdin)))) {
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering/show_packet_stdout.c:73:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((nib = (getc(stdin)))) {
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering_2/send_packet_stdin.c:72:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((nib = (getc(stdin)))) {
data/maradns-2.0.13/deadwood-3.2.09/sqa/sqa_tcp_buffering_2/show_packet_stdout.c:73:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while((nib = (getc(stdin)))) {
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:75:44:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                *(seedit->str + counter) = getc(in);
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:921:15:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        get = fgetc(handle);
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:932:23:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                get = fgetc(handle);
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:955:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        get = getc(handle);
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:966:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                get = getc(handle);
data/maradns-2.0.13/deadwood-3.2.09/src/DwHash.c:1006:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                get = getc(handle);
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.c:719:14:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ch = fgetc(look);
data/maradns-2.0.13/deadwood-3.2.09/src/DwMararc.c:743:22:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                ch = fgetc(look);
data/maradns-2.0.13/deadwood-3.2.09/src/DwSys.c:628:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(seed,(void *)noise,len) < 16) {
data/maradns-2.0.13/deadwood-3.2.09/src/RandomPrime.c:100:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                get = getc(rand);
data/maradns-2.0.13/dns/Queries.c:209:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned char toread, read;
data/maradns-2.0.13/dns/Queries.c:239:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read <= toread) {
data/maradns-2.0.13/dns/Queries.c:284:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned char toread, read;
data/maradns-2.0.13/dns/Queries.c:312:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read <= toread) {
data/maradns-2.0.13/dns/Queries.c:699:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned char toread, read;
data/maradns-2.0.13/dns/Queries.c:729:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read <= toread) {
data/maradns-2.0.13/dns/Queries.c:775:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    unsigned char read,toread;
data/maradns-2.0.13/dns/Queries.c:806:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read <= toread) {
data/maradns-2.0.13/dns/Queries.c:838:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read <= toread) {
data/maradns-2.0.13/dns/Queries.c:880:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    uint16 toread,read;
data/maradns-2.0.13/dns/Queries.c:906:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        while(read <= toread) {
data/maradns-2.0.13/libs/JsStrOS.c:152:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if((why = malloc(strlen(whence) + 2)) == 0) {
data/maradns-2.0.13/libs/JsStrOS.c:156:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(why,whence,strlen(whence) + 1);
data/maradns-2.0.13/libs/JsStrOS.c:156:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    strncpy(why,whence,strlen(whence) + 1);
data/maradns-2.0.13/libs/JsStrOS.c:455:25:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        temp[counter] = getc(stdin);
data/maradns-2.0.13/libs/JsStrOS.c:597:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    value = read(desc->file_desc,js->string,count);
data/maradns-2.0.13/libs/JsStrOS.c:861:32:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return js_str2js(js,string,strlen(string),js->unit_size);
data/maradns-2.0.13/libs/MaraHash.c:701:38:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:701:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:703:38:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:703:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:705:38:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:705:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:707:38:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:707:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        mhash_secret_add_constant ^= getc(read);
data/maradns-2.0.13/libs/MaraHash.c:708:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        fclose(read);
data/maradns-2.0.13/libs/mtest.c:32:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:33: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).
        strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:67:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:68:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:72:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:73: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:100:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:101: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:105:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:106: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:113:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:114: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:118:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:119: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:127:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:128: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/mtest.c:139:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/mtest.c:140: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/tests.c:85:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/tests.c:86:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/tests.c:90:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/tests.c:91: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/tests.c:95:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/tests.c:96: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/tests.c:103:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/tests.c:104: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/libs/tests.c:115:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            if(strn[strlen(strn) - 1] == '\n')
data/maradns-2.0.13/libs/tests.c:116: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).
                strn[strlen(strn) - 1] = '\0';
data/maradns-2.0.13/parse/Csv2_main.c:486:28:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                        if(read(0,get,2) != 1) {
data/maradns-2.0.13/parse/Csv2_main.c:500:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                if(read(0,get,1) != 1) {
data/maradns-2.0.13/parse/Csv2_read.c:175:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                out = getc(file->reading);
data/maradns-2.0.13/parse/ParseMaraRc.c:716:23:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    js_str2js(equals,&equal,1,1);
data/maradns-2.0.13/rng/rng-api-fst.c:89:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(key->keyMaterial, keyMaterial, keyLen/4);
data/maradns-2.0.13/server/MaraDNS.c:2814:20:  [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(num_string,"pastY2038",11);
data/maradns-2.0.13/server/MaraDNS.c:2889:15:  [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.
           if(strncpy(query_string,"T0.verbose_level.maradns.",29) == 0) {
data/maradns-2.0.13/server/timestamp.c:114:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ct,asctime(gmtime(&now)),100);
data/maradns-2.0.13/sqa/aaaatest.c:60:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/asktest.c:62:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/asktest.c:67: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(hostname) > 16)
data/maradns-2.0.13/sqa/asktest.c:68:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r_inBlock,hostname+16,16);
data/maradns-2.0.13/sqa/old/old-tests/show.charnum.c:28:11:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c=getc(f);
data/maradns-2.0.13/sqa/qr.test.c:60:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/regressions/bad_query/check_bad_query.c:122:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)crypto_key,hostname,16);
data/maradns-2.0.13/sqa/regressions/bad_query/check_bad_query.c:134: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(hostname) > 16)
data/maradns-2.0.13/sqa/regressions/bad_query/check_bad_query.c:135:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)r_inBlock,hostname+16,16);
data/maradns-2.0.13/sqa/regressions/noise/sendnoise.c:63:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,seed,16);
data/maradns-2.0.13/sqa/regressions/noise/sendnoise.c:68: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(seed) > 16)
data/maradns-2.0.13/sqa/regressions/noise/sendnoise.c:69:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(r_inBlock,seed+16,16);
data/maradns-2.0.13/sqa/regressions/predator1/sendp1.c:61:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/regressions/predator1/sendp1.c:66: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(hostname) > 16)
data/maradns-2.0.13/sqa/regressions/predator1/sendp1.c:67:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r_inBlock,hostname+16,16);
data/maradns-2.0.13/sqa/regressions/predator2/sendp2.c:61:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/regressions/predator2/sendp2.c:66: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(hostname) > 16)
data/maradns-2.0.13/sqa/regressions/predator2/sendp2.c:67:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r_inBlock,hostname+16,16);
data/maradns-2.0.13/sqa/sendnoise.c:63:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,seed,16);
data/maradns-2.0.13/sqa/sendnoise.c:68: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(seed) > 16)
data/maradns-2.0.13/sqa/sendnoise.c:69:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(r_inBlock,seed+16,16);
data/maradns-2.0.13/sqa/sendtcp.c:46:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/sendtcp.c:52:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r_inBlock,hostname+16,16);
data/maradns-2.0.13/sqa/sendudp.c:61:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(crypto_key,hostname,16);
data/maradns-2.0.13/sqa/sendudp.c:66: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(hostname) > 16)
data/maradns-2.0.13/sqa/sendudp.c:67:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(r_inBlock,hostname+16,16);
data/maradns-2.0.13/tcp/zoneserver.c:196:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(desc,prng_seed,16) != 16) { /* 16 bytes: 128-bit seed */
data/maradns-2.0.13/tcp/zoneserver.c:636:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(0,get,2) != 2)
data/maradns-2.0.13/tcp/zoneserver.c:651:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if(read(0,name->string,length) != length)
data/maradns-2.0.13/tcp/zoneserver.c:899:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if(read(0,get,2) != 2)
data/maradns-2.0.13/tcp/zoneserver.c:912:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                if(read(0,get,1) != 1)
data/maradns-2.0.13/tcp/zoneserver.c:1282:50:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                                        readed = read(counter,buf,1024);
data/maradns-2.0.13/tools/askmara-tcp.c:125:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)crypto_key,hostname,16);
data/maradns-2.0.13/tools/askmara-tcp.c:137: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(hostname) > 16)
data/maradns-2.0.13/tools/askmara-tcp.c:138:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)r_inBlock,hostname+16,16);
data/maradns-2.0.13/tools/askmara.c:124:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)crypto_key,hostname,16);
data/maradns-2.0.13/tools/askmara.c:136: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(hostname) > 16)
data/maradns-2.0.13/tools/askmara.c:137:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy((char *)r_inBlock,hostname+16,16);
data/maradns-2.0.13/tools/misc/mqhash.c:347:16:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            if(strncpy(fp,getenv("HOME"),50) == NULL) {
data/maradns-2.0.13/tools/misc/mqhash.c:382:16:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            if(strncpy(fp,getenv("HOME"),50) == NULL) {
data/maradns-2.0.13/tools/misc/rg32hash.c:590:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path,dir,PATH_MAX - 10);
data/maradns-2.0.13/tools/misc/rg32hash.c:591:9:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
        strncat(path,"/",1);
data/maradns-2.0.13/tools/misc/rg32hash.c:592:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if((strlen(path) + 10 + strlen(f->d_name)) >= PATH_MAX) {
data/maradns-2.0.13/tools/misc/rg32hash.c:592:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if((strlen(path) + 10 + strlen(f->d_name)) >= PATH_MAX) {
data/maradns-2.0.13/tools/misc/rnghash.c:52:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        readed = read(desc,bufr,BUF_MAX);
data/maradns-2.0.13/tools/strip.control.c:26:21:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                a = getc(stdin);
data/maradns-2.0.13/utf8/l1toutf8.c:41:12:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
       x = getc(stdin);
data/maradns-2.0.13/utf8/lcol.c:37:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            d=getc(stdin);
data/maradns-2.0.13/utf8/utf8tol1.c:29:15:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          c = getc(stdin);
data/maradns-2.0.13/utf8/utf8tol1.c:37:23:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                  c = getc(stdin);
data/maradns-2.0.13/utf8/utf8tol1.c:46:27:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                      c = getc(stdin);

ANALYSIS SUMMARY:

Hits = 335
Lines analyzed = 58664 in approximately 1.81 seconds (32426 lines/second)
Physical Source Lines of Code (SLOC) = 38774
Hits@level = [0] 1396 [1] 130 [2] 179 [3]  17 [4]   9 [5]   0
Hits@level+ = [0+] 1731 [1+] 335 [2+] 205 [3+]  26 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 44.6433 [1+] 8.63981 [2+] 5.28705 [3+] 0.670552 [4+] 0.232114 [5+]   0
Symlinks skipped = 3 (--allowlink overrides but see doc for security issue)
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.