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/getdns-1.6.0/cmake/tests/test___func__.c Examining data/getdns-1.6.0/cmake/tests/test_poll.c Examining data/getdns-1.6.0/cmake/tests/test_uv_cb.c Examining data/getdns-1.6.0/spec/example/example-all-functions.c Examining data/getdns-1.6.0/spec/example/example-reverse.c Examining data/getdns-1.6.0/spec/example/example-simple-answers.c Examining data/getdns-1.6.0/spec/example/example-synchronous.c Examining data/getdns-1.6.0/spec/example/example-tree.c Examining data/getdns-1.6.0/spec/example/getdns_core_only.h Examining data/getdns-1.6.0/spec/example/getdns_libevent.h Examining data/getdns-1.6.0/src/anchor.c Examining data/getdns-1.6.0/src/anchor.h Examining data/getdns-1.6.0/src/compat/arc4_lock.c Examining data/getdns-1.6.0/src/compat/arc4random.c Examining data/getdns-1.6.0/src/compat/arc4random_uniform.c Examining data/getdns-1.6.0/src/compat/chacha_private.h Examining data/getdns-1.6.0/src/compat/explicit_bzero.c Examining data/getdns-1.6.0/src/compat/getentropy_linux.c Examining data/getdns-1.6.0/src/compat/getentropy_osx.c Examining data/getdns-1.6.0/src/compat/getentropy_solaris.c Examining data/getdns-1.6.0/src/compat/getentropy_win.c Examining data/getdns-1.6.0/src/compat/gettimeofday.c Examining data/getdns-1.6.0/src/compat/inet_ntop.c Examining data/getdns-1.6.0/src/compat/inet_pton.c Examining data/getdns-1.6.0/src/compat/mkstemp.c Examining data/getdns-1.6.0/src/compat/sha512.c Examining data/getdns-1.6.0/src/compat/strlcpy.c Examining data/getdns-1.6.0/src/compat/strptime.c Examining data/getdns-1.6.0/src/const-info.c Examining data/getdns-1.6.0/src/const-info.h Examining data/getdns-1.6.0/src/context.c Examining data/getdns-1.6.0/src/context.h Examining data/getdns-1.6.0/src/convert.c Examining data/getdns-1.6.0/src/convert.h Examining data/getdns-1.6.0/src/debug.h Examining data/getdns-1.6.0/src/dict.c Examining data/getdns-1.6.0/src/dict.h Examining data/getdns-1.6.0/src/dnssec.c Examining data/getdns-1.6.0/src/dnssec.h Examining data/getdns-1.6.0/src/extension/default_eventloop.h Examining data/getdns-1.6.0/src/extension/libev.c Examining data/getdns-1.6.0/src/extension/libevent.c Examining data/getdns-1.6.0/src/extension/libuv.c Examining data/getdns-1.6.0/src/extension/poll_eventloop.c Examining data/getdns-1.6.0/src/extension/poll_eventloop.h Examining data/getdns-1.6.0/src/extension/select_eventloop.c Examining data/getdns-1.6.0/src/extension/select_eventloop.h Examining data/getdns-1.6.0/src/general.c Examining data/getdns-1.6.0/src/general.h Examining data/getdns-1.6.0/src/getdns/getdns_ext_libev.h Examining data/getdns-1.6.0/src/getdns/getdns_ext_libevent.h Examining data/getdns-1.6.0/src/getdns/getdns_ext_libuv.h Examining data/getdns-1.6.0/src/gldns/gbuffer.c Examining data/getdns-1.6.0/src/gldns/gbuffer.h Examining data/getdns-1.6.0/src/gldns/keyraw.c Examining data/getdns-1.6.0/src/gldns/keyraw.h Examining data/getdns-1.6.0/src/gldns/parse.c Examining data/getdns-1.6.0/src/gldns/parse.h Examining data/getdns-1.6.0/src/gldns/parseutil.c Examining data/getdns-1.6.0/src/gldns/parseutil.h Examining data/getdns-1.6.0/src/gldns/pkthdr.h Examining data/getdns-1.6.0/src/gldns/rrdef.c Examining data/getdns-1.6.0/src/gldns/rrdef.h Examining data/getdns-1.6.0/src/gldns/str2wire.c Examining data/getdns-1.6.0/src/gldns/str2wire.h Examining data/getdns-1.6.0/src/gldns/wire2str.c Examining data/getdns-1.6.0/src/gldns/wire2str.h Examining data/getdns-1.6.0/src/gnutls/keyraw-internal.c Examining data/getdns-1.6.0/src/gnutls/keyraw-internal.h Examining data/getdns-1.6.0/src/gnutls/pubkey-pinning-internal.c Examining data/getdns-1.6.0/src/gnutls/tls-internal.h Examining data/getdns-1.6.0/src/gnutls/tls.c Examining data/getdns-1.6.0/src/jsmn/jsmn.c Examining data/getdns-1.6.0/src/jsmn/jsmn.h Examining data/getdns-1.6.0/src/list.c Examining data/getdns-1.6.0/src/list.h Examining data/getdns-1.6.0/src/mdns.c Examining data/getdns-1.6.0/src/mdns.h Examining data/getdns-1.6.0/src/openssl/keyraw-internal.c Examining data/getdns-1.6.0/src/openssl/keyraw-internal.h Examining data/getdns-1.6.0/src/openssl/pubkey-pinning-internal.c Examining data/getdns-1.6.0/src/openssl/tls-internal.h Examining data/getdns-1.6.0/src/openssl/tls.c Examining data/getdns-1.6.0/src/platform.c Examining data/getdns-1.6.0/src/platform.h Examining data/getdns-1.6.0/src/pubkey-pinning.c Examining data/getdns-1.6.0/src/pubkey-pinning.h Examining data/getdns-1.6.0/src/request-internal.c Examining data/getdns-1.6.0/src/rr-dict.c Examining data/getdns-1.6.0/src/rr-dict.h Examining data/getdns-1.6.0/src/rr-iter.c Examining data/getdns-1.6.0/src/rr-iter.h Examining data/getdns-1.6.0/src/server.c Examining data/getdns-1.6.0/src/server.h Examining data/getdns-1.6.0/src/ssl_dane/danessl.c Examining data/getdns-1.6.0/src/ssl_dane/danessl.h Examining data/getdns-1.6.0/src/stub.c Examining data/getdns-1.6.0/src/stub.h Examining data/getdns-1.6.0/src/sync.c Examining data/getdns-1.6.0/src/test/check_getdns.c Examining data/getdns-1.6.0/src/test/check_getdns_address.h Examining data/getdns-1.6.0/src/test/check_getdns_address_sync.h Examining data/getdns-1.6.0/src/test/check_getdns_cancel_callback.h Examining data/getdns-1.6.0/src/test/check_getdns_common.c Examining data/getdns-1.6.0/src/test/check_getdns_common.h Examining data/getdns-1.6.0/src/test/check_getdns_context_create.h Examining data/getdns-1.6.0/src/test/check_getdns_context_destroy.h Examining data/getdns-1.6.0/src/test/check_getdns_context_set_context_update_callback.h Examining data/getdns-1.6.0/src/test/check_getdns_context_set_dns_transport.h Examining data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.c Examining data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.h Examining data/getdns-1.6.0/src/test/check_getdns_context_set_upstream_recursive_servers.h Examining data/getdns-1.6.0/src/test/check_getdns_convert_alabel_to_ulabel.h Examining data/getdns-1.6.0/src/test/check_getdns_convert_ulabel_to_alabel.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_destroy.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_get_bindata.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_get_data_type.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_get_dict.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_get_int.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_get_list.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_set_bindata.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_set_dict.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_set_int.h Examining data/getdns-1.6.0/src/test/check_getdns_dict_set_list.h Examining data/getdns-1.6.0/src/test/check_getdns_display_ip_address.h Examining data/getdns-1.6.0/src/test/check_getdns_eventloop.h Examining data/getdns-1.6.0/src/test/check_getdns_general.h Examining data/getdns-1.6.0/src/test/check_getdns_general_sync.h Examining data/getdns-1.6.0/src/test/check_getdns_hostname.h Examining data/getdns-1.6.0/src/test/check_getdns_hostname_sync.h Examining data/getdns-1.6.0/src/test/check_getdns_libev.c Examining data/getdns-1.6.0/src/test/check_getdns_libevent.c Examining data/getdns-1.6.0/src/test/check_getdns_libevent.h Examining data/getdns-1.6.0/src/test/check_getdns_libuv.c Examining data/getdns-1.6.0/src/test/check_getdns_list_get_bindata.h Examining data/getdns-1.6.0/src/test/check_getdns_list_get_data_type.h Examining data/getdns-1.6.0/src/test/check_getdns_list_get_dict.h Examining data/getdns-1.6.0/src/test/check_getdns_list_get_int.h Examining data/getdns-1.6.0/src/test/check_getdns_list_get_length.h Examining data/getdns-1.6.0/src/test/check_getdns_list_get_list.h Examining data/getdns-1.6.0/src/test/check_getdns_pretty_print_dict.h Examining data/getdns-1.6.0/src/test/check_getdns_selectloop.c Examining data/getdns-1.6.0/src/test/check_getdns_service.h Examining data/getdns-1.6.0/src/test/check_getdns_service_sync.h Examining data/getdns-1.6.0/src/test/check_getdns_transport.c Examining data/getdns-1.6.0/src/test/check_getdns_transport.h Examining data/getdns-1.6.0/src/test/scratchpad.template.c Examining data/getdns-1.6.0/src/test/testmessages.c Examining data/getdns-1.6.0/src/test/testmessages.h Examining data/getdns-1.6.0/src/test/tests_dict.c Examining data/getdns-1.6.0/src/test/tests_list.c Examining data/getdns-1.6.0/src/test/tests_namespaces.c Examining data/getdns-1.6.0/src/test/tests_stub_async.c Examining data/getdns-1.6.0/src/test/tests_stub_sync.c Examining data/getdns-1.6.0/src/tls.h Examining data/getdns-1.6.0/src/tls/anchor-internal.c Examining data/getdns-1.6.0/src/tls/pubkey-pinning-internal.h Examining data/getdns-1.6.0/src/tls/val_secalgo.c Examining data/getdns-1.6.0/src/tls/validator/val_nsec3.h Examining data/getdns-1.6.0/src/tls/validator/val_secalgo.h Examining data/getdns-1.6.0/src/tools/getdns_query.c Examining data/getdns-1.6.0/src/tools/getdns_server_mon.c Examining data/getdns-1.6.0/src/types-internal.h Examining data/getdns-1.6.0/src/ub_loop.c Examining data/getdns-1.6.0/src/ub_loop.h Examining data/getdns-1.6.0/src/util-internal.c Examining data/getdns-1.6.0/src/util-internal.h Examining data/getdns-1.6.0/src/util/auxiliary/fptr_wlist.h Examining data/getdns-1.6.0/src/util/auxiliary/log.h Examining data/getdns-1.6.0/src/util/auxiliary/sldns/keyraw.h Examining data/getdns-1.6.0/src/util/auxiliary/sldns/rrdef.h Examining data/getdns-1.6.0/src/util/auxiliary/sldns/sbuffer.h Examining data/getdns-1.6.0/src/util/auxiliary/util/data/packed_rrset.h Examining data/getdns-1.6.0/src/util/auxiliary/util/fptr_wlist.h Examining data/getdns-1.6.0/src/util/auxiliary/util/log.h Examining data/getdns-1.6.0/src/util/auxiliary/util/storage/lookup3.h Examining data/getdns-1.6.0/src/util/auxiliary/util/storage/lruhash.h Examining data/getdns-1.6.0/src/util/locks.c Examining data/getdns-1.6.0/src/util/locks.h Examining data/getdns-1.6.0/src/util/lookup3.c Examining data/getdns-1.6.0/src/util/lookup3.h Examining data/getdns-1.6.0/src/util/lruhash.c Examining data/getdns-1.6.0/src/util/lruhash.h Examining data/getdns-1.6.0/src/util/orig-headers/locks.h Examining data/getdns-1.6.0/src/util/orig-headers/lookup3.h Examining data/getdns-1.6.0/src/util/orig-headers/lruhash.h Examining data/getdns-1.6.0/src/util/orig-headers/rbtree.h Examining data/getdns-1.6.0/src/util/orig-headers/val_secalgo.h Examining data/getdns-1.6.0/src/util/rbtree.c Examining data/getdns-1.6.0/src/util/rbtree.h Examining data/getdns-1.6.0/src/util/val_secalgo.h Examining data/getdns-1.6.0/src/yxml/yxml.c Examining data/getdns-1.6.0/src/yxml/yxml.h Examining data/getdns-1.6.0/stubby/cmake/tests/test_format_attr.c Examining data/getdns-1.6.0/stubby/cmake/tests/test_unused_attr.c Examining data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c Examining data/getdns-1.6.0/stubby/src/compat/getopt.c Examining data/getdns-1.6.0/stubby/src/compat/getopt.h Examining data/getdns-1.6.0/stubby/src/sldns/sbuffer.c Examining data/getdns-1.6.0/stubby/src/sldns/sbuffer.h Examining data/getdns-1.6.0/stubby/src/stubby.c Examining data/getdns-1.6.0/stubby/src/yaml/convert_yaml_to_json.c Examining data/getdns-1.6.0/stubby/src/yaml/convert_yaml_to_json.h FINAL RESULTS: data/getdns-1.6.0/src/anchor.c:1104:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) snprintf( write_buf, buf_sz, fmt data/getdns-1.6.0/src/anchor.c:1112:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (void) snprintf( write_buf, buf_sz, fmt data/getdns-1.6.0/src/compat/getentropy_linux.c:408:7: [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. HF(printf); /* an addr in libc */ data/getdns-1.6.0/src/compat/getentropy_osx.c:302:7: [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. HF(printf); /* an addr in libc */ data/getdns-1.6.0/src/compat/getentropy_solaris.c:313:7: [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. HF(printf); /* an addr in libc */ data/getdns-1.6.0/src/compat/inet_ntop.c:95:6: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. l = snprintf(tmp, size, fmt, src[0], src[1], src[2], src[3]); data/getdns-1.6.0/src/context.c:1771:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. uint64_t system, getdns_loglevel_type level, getdns_logfunc_type log) data/getdns-1.6.0/src/context.c:1778:24: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. context->log.system = system; data/getdns-1.6.0/src/context.c:4789:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(path, context->appdata_dir); data/getdns-1.6.0/src/context.c:4810:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(path, context->appdata_dir); data/getdns-1.6.0/src/context.c:4823:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else if (!strcpy(path, home)) data/getdns-1.6.0/src/context.c:4832:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). (void) strcpy(path + len, APPDATA_SUBDIR); data/getdns-1.6.0/src/context.c:4873:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else if (!strcpy(path + len, fn)) data/getdns-1.6.0/src/context.c:4952:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else if (!strcpy(path + len, fn)) data/getdns-1.6.0/src/context.c:5029:12: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). else if (!strcpy(path + len, test_fn)) data/getdns-1.6.0/src/context.h:268:23: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. uint64_t system; data/getdns-1.6.0/src/context.h:512:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. uint64_t system, getdns_loglevel_type level) data/getdns-1.6.0/src/context.h:514:29: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ; return log->func && (log->system & system) && level <= log->level; } data/getdns-1.6.0/src/context.h:514:38: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. ; return log->func && (log->system & system) && level <= log->level; } data/getdns-1.6.0/src/context.h:517:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. uint64_t system, getdns_loglevel_type level, const char *fmt, ...) data/getdns-1.6.0/src/context.h:521:30: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (!_getdns_check_log(log, system, level)) data/getdns-1.6.0/src/context.h:525:26: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. log->func(log->userarg, system, level, fmt, args); data/getdns-1.6.0/src/context.h:530:14: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. uint64_t system, getdns_loglevel_type level, const char *fmt, ...) data/getdns-1.6.0/src/context.h:535:46: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. || !_getdns_check_log(&up->upstreams->log, system, level)) data/getdns-1.6.0/src/context.h:540:34: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. up->upstreams->log.userarg, system, level, fmt, args); data/getdns-1.6.0/src/debug.h:60:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/getdns-1.6.0/src/debug.h:74:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/getdns-1.6.0/src/debug.h:86:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/getdns-1.6.0/src/debug.h:98:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/getdns-1.6.0/src/gldns/gbuffer.c:141:13: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. written = vsnprintf((char *) gldns_buffer_current(buffer), remaining, data/getdns-1.6.0/src/gldns/gbuffer.c:153:14: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. written = vsnprintf((char *) gldns_buffer_current(buffer), data/getdns-1.6.0/src/gldns/gbuffer.h:780:14: [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. ATTR_FORMAT(printf, 2, 3); data/getdns-1.6.0/src/gldns/wire2str.c:320:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. int w = vsnprintf(*str, *slen, format, args); data/getdns-1.6.0/src/gldns/wire2str.h:108:14: [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. ATTR_FORMAT(printf, 3, 4); data/getdns-1.6.0/src/gnutls/tls.c:77:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(res, s); data/getdns-1.6.0/src/gnutls/tls.c:93:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(res, s1); data/getdns-1.6.0/src/gnutls/tls.c:95:2: [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(res, s2); data/getdns-1.6.0/src/tools/getdns_query.c:1743:55: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. static void _getdns_query_log(void *userarg, uint64_t system, data/getdns-1.6.0/src/tools/getdns_query.c:1760:23: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. (void)userarg; (void)system; (void)level; data/getdns-1.6.0/src/tools/getdns_query.c:1762:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) vfprintf(stderr, fmt, ap); data/getdns-1.6.0/src/tools/getdns_server_mon.c:117:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, buflen, format, ap); data/getdns-1.6.0/src/tools/getdns_server_mon.c:397:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(test_info.errout, data/getdns-1.6.0/src/tools/getdns_server_mon.c:935:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(test_info->base_output, usage); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1167:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(test_info->base_output, USAGE); data/getdns-1.6.0/stubby/cmake/tests/test_format_attr.c:3:51: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void f(char *format, ...) __attribute__ ((format (printf, 1, 2))); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:116:19: [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. int err = execl(LAUNCHCTL, LAUNCHCTL, "load", "/Library/LaunchDaemons/org.getdns.stubby.plist", NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:126:19: [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. int err = execl(LAUNCHCTL, LAUNCHCTL, "unload", "/Library/LaunchDaemons/org.getdns.stubby.plist", NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:136:19: [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. int err = execl(LAUNCHCTL, LAUNCHCTL, "list", "org.getdns.stubby", NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:146:19: [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. int err = execl(STUBBY_SETDNS, STUBBY_SETDNS, NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:156:19: [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. int err = execl(STUBBY_SETDNS, STUBBY_SETDNS, "-r", NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:166:19: [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. int err = execl(STUBBY_SETDNS, STUBBY_SETDNS, "-l", NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:176:19: [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. int err = execl(STUBBY, STUBBY, "-C", config_file, "-i", NULL); data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:186:19: [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. int err = execl(CP, CP, config_file, DEFAULT_CONFIG_FILE, NULL); data/getdns-1.6.0/stubby/src/sldns/sbuffer.c:139:13: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. written = vsnprintf((char *) sldns_buffer_current(buffer), remaining, data/getdns-1.6.0/stubby/src/sldns/sbuffer.c:151:14: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. written = vsnprintf((char *) sldns_buffer_current(buffer), data/getdns-1.6.0/stubby/src/sldns/sbuffer.h:783:14: [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. ATTR_FORMAT(printf, 2, 3); data/getdns-1.6.0/stubby/src/stubby.c:100:18: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/getdns-1.6.0/stubby/src/stubby.c:136:18: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/getdns-1.6.0/stubby/src/stubby.c:181:54: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. static void stubby_local_log(void *userarg, uint64_t system, data/getdns-1.6.0/stubby/src/stubby.c:227:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(out, STUBBY_PACKAGE_STRING "\n"); data/getdns-1.6.0/stubby/src/stubby.c:734:48: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. static void stubby_log(void *userarg, uint64_t system, data/getdns-1.6.0/stubby/src/stubby.c:751:23: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. (void)userarg; (void)system; (void)level; data/getdns-1.6.0/stubby/src/stubby.c:753:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void) vfprintf(stderr, fmt, ap); data/getdns-1.6.0/stubby/src/stubby.c:756:47: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. void stubby_local_log(void *userarg, uint64_t system, data/getdns-1.6.0/stubby/src/stubby.c:761:22: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. stubby_log(userarg, system, level, fmt, args); data/getdns-1.6.0/src/compat/arc4_lock.c:76:4: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&arc_critical_section); data/getdns-1.6.0/src/compat/arc4_lock.c:100:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&arc_critical_section); data/getdns-1.6.0/src/context.c:4813:38: [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. } else if (!(home = p ? p->pw_dir : getenv("HOME"))) data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.c:131:24: [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 (!(test_port_str = getenv("GETDNS_TEST_PORT")) || data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.c:136:2: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((int)getpid() + (int)tv.tv_usec); data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.c:137: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. test_port += random() % 1000; data/getdns-1.6.0/src/test/check_getdns_transport.c:55:24: [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 (!(test_port_str = getenv("GETDNS_TEST_PORT")) || data/getdns-1.6.0/src/test/check_getdns_transport.c:60:2: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom((int)getpid() + (int)tv.tv_usec); data/getdns-1.6.0/src/test/check_getdns_transport.c:61: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. test_port += random() % 1000; data/getdns-1.6.0/src/tools/getdns_server_mon.c:1618:9: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/getdns-1.6.0/stubby/src/compat/getopt.c:53:5: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int nargc, char * const nargv[], const char *ostr) data/getdns-1.6.0/stubby/src/compat/getopt.h:10:5: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int nargc, char * const nargv[], const char *ostr); data/getdns-1.6.0/stubby/src/stubby.c:142:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *home = p ? p->pw_dir : getenv("HOME"); data/getdns-1.6.0/stubby/src/stubby.c:781:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "C:ighlv:V")) != -1) { data/getdns-1.6.0/src/anchor.c:60:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char zone[1024]; data/getdns-1.6.0/src/anchor.c:65:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char keytag[6]; data/getdns-1.6.0/src/anchor.c:66:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char algorithm[4]; data/getdns-1.6.0/src/anchor.c:67:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char digesttype[4]; data/getdns-1.6.0/src/anchor.c:68:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char digest[2048]; data/getdns-1.6.0/src/anchor.c:76:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, to_copy); data/getdns-1.6.0/src/anchor.c:159:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value[2048]; data/getdns-1.6.0/src/anchor.c:863:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy( data/getdns-1.6.0/src/anchor.c:879:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy( data/getdns-1.6.0/src/anchor.c:990:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char a_buf[40]; data/getdns-1.6.0/src/anchor.c:1039:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(&addr.sin_addr, a->rr->rr_i.rr_type + 10, 4); data/getdns-1.6.0/src/anchor.c:1047:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(&addr.sin6_addr, a->rr->rr_i.rr_type + 10, 16); data/getdns-1.6.0/src/anchor.c:1053: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 tas_hostname[256]; data/getdns-1.6.0/src/anchor.c:1173: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 tas_hostname[256] = "<no hostname>"; data/getdns-1.6.0/src/anchor.c:1183: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 tas_hostname[256] = "<no hostname>"; data/getdns-1.6.0/src/anchor.c:1191: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 tas_hostname[256] = "<no hostname>"; data/getdns-1.6.0/src/anchor.c:1231:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tas_hostname[256] = ""; data/getdns-1.6.0/src/anchor.c:1367:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(ksks->rrsigs[ksks->n_rrsigs++], data/getdns-1.6.0/src/anchor.c:1422:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pst.prev_rr, ptr, dname_len); data/getdns-1.6.0/src/anchor.c:1470:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str_spc[4096], *str_buf, *str_pos; data/getdns-1.6.0/src/compat/arc4random.c:110:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/urandom", flags, 0); data/getdns-1.6.0/src/compat/arc4random.c:270:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, keystream, m); data/getdns-1.6.0/src/compat/arc4random.c:289:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(val, keystream, sizeof(*val)); data/getdns-1.6.0/src/compat/chacha_private.h: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. static const char sigma[16] = "expand 32-byte k"; data/getdns-1.6.0/src/compat/chacha_private.h:52: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. static const char tau[16] = "expand 16-byte k"; data/getdns-1.6.0/src/compat/getentropy_linux.c:251:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/urandom", flags, 0); data/getdns-1.6.0/src/compat/getentropy_linux.c:550:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)buf + i, results, min(sizeof(results), len - i)); data/getdns-1.6.0/src/compat/getentropy_osx.c:174:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/urandom", flags, 0); data/getdns-1.6.0/src/compat/getentropy_osx.c:422:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)buf + i, results, min(sizeof(results), len - i)); data/getdns-1.6.0/src/compat/getentropy_solaris.c:189:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, flags, 0); data/getdns-1.6.0/src/compat/getentropy_solaris.c:431:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char*)buf + i, results, min(sizeof(results), len - i)); data/getdns-1.6.0/src/compat/inet_ntop.c:92:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[sizeof "255.255.255.255"]; data/getdns-1.6.0/src/compat/inet_ntop.c:120:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"]; data/getdns-1.6.0/src/compat/inet_pton.c:129:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, tmp, NS_INADDRSZ); data/getdns-1.6.0/src/compat/inet_pton.c:227:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, tmp, NS_IN6ADDRSZ); data/getdns-1.6.0/src/compat/mkstemp.c:38:5: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int mkstemp(char *template) data/getdns-1.6.0/src/compat/mkstemp.c:42:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(template, _O_CREAT | _O_EXCL, _S_IWRITE); data/getdns-1.6.0/src/compat/sha512.c:167:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MEMCPY_BCOPY(d,s,l) memcpy((d), (s), (l)) data/getdns-1.6.0/src/compat/sha512.c:171:29: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MEMCPY_BCOPY(d,s,l) bcopy((s), (d), (l)) data/getdns-1.6.0/src/context.c:171:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy(r, s->data, s->size); data/getdns-1.6.0/src/context.c:314:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(hnas->host_name, host_name, host_name_len); data/getdns-1.6.0/src/context.c:349:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addrstr[1024], *b; data/getdns-1.6.0/src/context.c:464:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2048]; data/getdns-1.6.0/src/context.c:473:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(in = fopen(hosts, "r"))) data/getdns-1.6.0/src/context.c:900:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(&upstream->addr, ai->ai_addr, ai->ai_addrlen); data/getdns-1.6.0/src/context.c:977: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 lszValue[255] = ""; data/getdns-1.6.0/src/context.c:978: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 lszDomain[255] = ""; data/getdns-1.6.0/src/context.c:1036: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 domain[1024] = ""; data/getdns-1.6.0/src/context.c:1128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024], domain[1024]; data/getdns-1.6.0/src/context.c:1147:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(in = fopen(context->fchg_resolvconf.fn, "r"))) data/getdns-1.6.0/src/context.c:1165:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(in = fopen(context->fchg_resolvconf.fn, "r"))) data/getdns-1.6.0/src/context.c:1800: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 buffer[64]; data/getdns-1.6.0/src/context.c:1996:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(context->namespaces, namespaces, data/getdns-1.6.0/src/context.c:2039:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(context->dns_transports, transports, data/getdns-1.6.0/src/context.c:2399:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpfn[FILENAME_MAX]; data/getdns-1.6.0/src/context.c:2416:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dst[2048]; data/getdns-1.6.0/src/context.c:2481:12: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((fd = mkstemp(tmpfn)) < 0) data/getdns-1.6.0/src/context.c:2548:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(context->root_servers_fn, tmpfn, strlen(tmpfn)); data/getdns-1.6.0/src/context.c:2593:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name_spc[1025], *name; data/getdns-1.6.0/src/context.c:2618: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. (void) memcpy(name_spc, bindata->data, bindata->size); data/getdns-1.6.0/src/context.c:2650:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy (suffixes, buf_spc, suffixes_len); data/getdns-1.6.0/src/context.c:2738:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addrstr[1024], portstr[1024], *eos; data/getdns-1.6.0/src/context.c:2774: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 tsig_name_str[1024]; data/getdns-1.6.0/src/context.c:2834:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(eos, scope_id->data, scope_id->size); data/getdns-1.6.0/src/context.c:2863: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. (void) memcpy(tsig_name_str, tsig_name->data data/getdns-1.6.0/src/context.c:2888: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. tsig_dname = memcpy(tsig_dname_spc, tsig_name->data data/getdns-1.6.0/src/context.c:2953:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(upstream->tls_auth_name, data/getdns-1.6.0/src/context.c:3000:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(upstream->tsig_dname, data/getdns-1.6.0/src/context.c:3008:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(upstream->tsig_key, data/getdns-1.6.0/src/context.c:3390:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr[1024]; data/getdns-1.6.0/src/context.c:3490:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ta_str[8192] = ""; data/getdns-1.6.0/src/context.c:3684:16: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return memcpy(r, s, sz); data/getdns-1.6.0/src/context.c:3706:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(dst->data, data, size); data/getdns-1.6.0/src/context.c:3824:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char appdata_dir[_GETDNS_PATH_MAX] = ""; data/getdns-1.6.0/src/context.c:4134:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(lookup, dnsreq->name, dnsreq->name_len); data/getdns-1.6.0/src/context.c:4229:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*namespaces, context->namespaces, data/getdns-1.6.0/src/context.c:4284:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*transports, context->dns_transports, data/getdns-1.6.0/src/context.c:4317:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/getdns-1.6.0/src/context.c:4531:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[FILENAME_MAX]; data/getdns-1.6.0/src/context.c:4548:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(fn, fn_bd->data, fn_bd->size); data/getdns-1.6.0/src/context.c:4551:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fh = fopen(fn, "r"))) data/getdns-1.6.0/src/context.c:4602: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. (void) memcpy(str_buf, (char *)bd->data, bd->size); \ data/getdns-1.6.0/src/context.c:4627:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str_buf[1024], *tmp_str; data/getdns-1.6.0/src/context.c:4863:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[_GETDNS_PATH_MAX]; data/getdns-1.6.0/src/context.c:4876:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). else if (!(f = fopen(path, "r"))) data/getdns-1.6.0/src/context.c:4934:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[_GETDNS_PATH_MAX], tmpfn[_GETDNS_PATH_MAX]; data/getdns-1.6.0/src/context.c:4955:17: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). else if ((fd = mkstemp(tmpfn)) < 0) data/getdns-1.6.0/src/context.c:5002:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char test_fn[30], path[_GETDNS_PATH_MAX]; data/getdns-1.6.0/src/context.h:73:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fn[_GETDNS_PATH_MAX]; data/getdns-1.6.0/src/context.h:141:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr_str[INET6_ADDRSTRLEN]; data/getdns-1.6.0/src/context.h:224:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tls_auth_name[256]; data/getdns-1.6.0/src/context.h:334:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char root_servers_fn[FILENAME_MAX]; data/getdns-1.6.0/src/convert.c:162:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[256]; data/getdns-1.6.0/src/convert.c:219:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, buf_spc, buf_len); data/getdns-1.6.0/src/convert.c:352:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_spc[4096], *buf; data/getdns-1.6.0/src/convert.c:365:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, buf_spc, buf_len); data/getdns-1.6.0/src/convert.c:535:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pst.prev_rr, rr, dname_len); data/getdns-1.6.0/src/convert.c:883:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, buf_spc, buf_len); data/getdns-1.6.0/src/convert.c:941:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_spc[4096], *buf; data/getdns-1.6.0/src/convert.c:954:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, buf_spc, buf_len); data/getdns-1.6.0/src/convert.c:1126:43: [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). getdns_dict_set_int(r, "port", (int32_t)atoi(portstr)); data/getdns-1.6.0/src/convert.c:1128:47: [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). getdns_dict_set_int(r, "tls_port", (int32_t)atoi(tls_portstr)); data/getdns-1.6.0/src/convert.c:1153:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str[3072]; data/getdns-1.6.0/src/convert.c:1159:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1171:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str_buf[1025]; data/getdns-1.6.0/src/convert.c:1205:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1268:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str[1025]; data/getdns-1.6.0/src/convert.c:1275:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str[16]; data/getdns-1.6.0/src/convert.c:1291:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1305:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((*value)->data, buf, 4); data/getdns-1.6.0/src/convert.c:1314:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str[40]; data/getdns-1.6.0/src/convert.c:1321:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1335:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy((*value)->data, buf, 16); data/getdns-1.6.0/src/convert.c:1343:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str[11]; data/getdns-1.6.0/src/convert.c:1350:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1359:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char value_str[80] = ""; data/getdns-1.6.0/src/convert.c:1365:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(value_str, js + t->start, size); data/getdns-1.6.0/src/convert.c:1398:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key_spc[1024], *key = NULL; data/getdns-1.6.0/src/convert.c:1426:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(key, js + t[j].start, t[j].end - t[j].start); data/getdns-1.6.0/src/convert.c:1539: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. (void) memcpy(item->data.bindata->data, data/getdns-1.6.0/src/convert.c:1644: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 value_buf[3072], *value_str = value_buf; data/getdns-1.6.0/src/debug.h:52:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_dEbUgSyM[10]; \ data/getdns-1.6.0/src/debug.h:66:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_dEbUgSyM[10]; \ data/getdns-1.6.0/src/debug.h: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 buf_dEbUgSyM[10]; \ data/getdns-1.6.0/src/debug.h:92:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_dEbUgSyM[10]; \ data/getdns-1.6.0/src/debug.h:113:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1024]; data/getdns-1.6.0/src/dict.c:86:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char first_spc[1024] = "", *first; data/getdns-1.6.0/src/dict.c:105:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char first_spc[1024], *first; data/getdns-1.6.0/src/dict.c:130:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(first, jptr, sz); data/getdns-1.6.0/src/dict.c:772:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char spc[1024]; data/getdns-1.6.0/src/dict.c:1061:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[80]; data/getdns-1.6.0/src/dnssec.c:390:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str_spc[8192], *str = str_spc; data/getdns-1.6.0/src/dnssec.c:406:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[1024]; data/getdns-1.6.0/src/dnssec.c:428:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char owner[1024]; data/getdns-1.6.0/src/dnssec.c:429:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_space[2048]; data/getdns-1.6.0/src/dnssec.c:623:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(head->name_spc, rrset->name, dname_len); data/getdns-1.6.0/src/dnssec.c:753:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, c, *c + 1); data/getdns-1.6.0/src/dnssec.c:768:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, dname_rdata, _dname_len(dname_rdata)); data/getdns-1.6.0/src/dnssec.c:948:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/getdns-1.6.0/src/dnssec.c:1009:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/getdns-1.6.0/src/dnssec.c:1483:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(owner + 2, owner_offset, owner_len - 2); data/getdns-1.6.0/src/dnssec.c:1488:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(owner, rrset->name, owner_len); data/getdns-1.6.0/src/dnssec.c:1648:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(dst, salt + 1, *salt); data/getdns-1.6.0/src/dnssec.c:1653:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(buf + SHA_DIGEST_LENGTH, salt + 1, *salt); data/getdns-1.6.0/src/dnssec.c:1655:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(buf, md, SHA_DIGEST_LENGTH); data/getdns-1.6.0/src/dnssec.c:1906:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char digest_spc[256], *digest; data/getdns-1.6.0/src/dnssec.c:1907:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char digest_buf_spc[2048], *digest_buf; data/getdns-1.6.0/src/dnssec.c:1924:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(digest_buf_spc, dnskey_set->name, dnskey_owner_len); data/getdns-1.6.0/src/dnssec.c:1978: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. (void) memcpy(digest_buf, data/getdns-1.6.0/src/dnssec.c:1981:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(digest_buf + dnskey_owner_len, data/getdns-1.6.0/src/dnssec.c:2320:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(wc_name + 2, nc_name, _dname_len(nc_name)); data/getdns-1.6.0/src/dnssec.c:2487:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(wc_name+2, ce_name, _dname_len(ce_name)); data/getdns-1.6.0/src/dnssec.c:3882:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(in = fopen(TRUST_ANCHOR_FILE, "r"))) data/getdns-1.6.0/src/general.c:131:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dns_req->name + dns_req->name_len - 1, data/getdns-1.6.0/src/general.c:173:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dns_req->name + dns_req->name_len - 1, data/getdns-1.6.0/src/general.c:401:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/getdns-1.6.0/src/general.c:779:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/getdns-1.6.0/src/gldns/gbuffer.c:61:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer->_data, data, size); data/getdns-1.6.0/src/gldns/gbuffer.h:471:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer->_data + at, data, data/getdns-1.6.0/src/gldns/gbuffer.h:475:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer->_data + at, data, count); data/getdns-1.6.0/src/gldns/gbuffer.h:653:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, buffer->_data + at, count); data/getdns-1.6.0/src/gldns/rrdef.c:717:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(name + 4); data/getdns-1.6.0/src/gldns/rrdef.c:755:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(name + 5); data/getdns-1.6.0/src/gldns/str2wire.c:179:16: [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(r) return memcpy(r, dname, *len); data/getdns-1.6.0/src/gldns/str2wire.c:444:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). hex_data_size = (size_t)atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:740:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[GLDNS_MAX_RDFLEN+1] = ""; data/getdns-1.6.0/src/gldns/str2wire.c:865:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[GLDNS_RR_BUF_SIZE+1]; data/getdns-1.6.0/src/gldns/str2wire.c:1125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char my_ip_str[64]; data/getdns-1.6.0/src/gldns/str2wire.c:1156:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). family = (uint16_t) atoi(my_str); data/getdns-1.6.0/src/gldns/str2wire.c:1191:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). prefix = (uint8_t) atoi(my_str); data/getdns-1.6.0/src/gldns/str2wire.c:1283:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[64]; /* for a type name */ data/getdns-1.6.0/src/gldns/str2wire.c:1711:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[50], proto_str[50]; data/getdns-1.6.0/src/gldns/str2wire.c:1728:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). else rd[0] = (uint8_t)atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:1736:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). serv_port = atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:1858:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[512]; data/getdns-1.6.0/src/gldns/str2wire.c:1868:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rd[0] = (uint8_t)atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:1873:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rd[1] = (uint8_t)atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:1879:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rd[2] = (uint8_t)atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:2141:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char token[512]; data/getdns-1.6.0/src/gldns/str2wire.c:2151:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rd[0] = (uint8_t)atoi(token); data/getdns-1.6.0/src/gldns/str2wire.c:2165: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). relay_type = (uint8_t)atoi(token); data/getdns-1.6.0/src/gldns/wire2str.c:220:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/getdns-1.6.0/src/gldns/wire2str.c:227:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/getdns-1.6.0/src/gldns/wire2str.c:243:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16]; data/getdns-1.6.0/src/gldns/wire2str.c:1094:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/getdns-1.6.0/src/gldns/wire2str.c:1108:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/getdns-1.6.0/src/gldns/wire2str.c:1352:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char date_buf[16]; data/getdns-1.6.0/src/gldns/wire2str.c:1932:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/getdns-1.6.0/src/gldns/wire2str.c:1950:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/getdns-1.6.0/src/gnutls/tls.c:594:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p[3], pin->pin, SHA256_DIGEST_LENGTH); data/getdns-1.6.0/src/gnutls/tls.c:602:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p[3], pin->pin, SHA256_DIGEST_LENGTH); data/getdns-1.6.0/src/gnutls/tls.c:688: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(new_cert_list, cert_list, cert_list_size*sizeof(gnutls_datum_t)); data/getdns-1.6.0/src/mdns.c:181:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(name + name_index, message + current_index, l); data/getdns-1.6.0/src/mdns.c:543:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(key + sizeof(getdns_mdns_cached_key_header), name, name_len); data/getdns-1.6.0/src/mdns.c:586:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data + current_index, name, name_len); data/getdns-1.6.0/src/mdns.c:656:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*new_record + current_length, record_data, record_data_len); data/getdns-1.6.0/src/mdns.c:997:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(netreq->response, packet, packet_length); data/getdns-1.6.0/src/mdns.c:1346:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mcast_dest, &ipv4_dest, sizeof(ipv4_dest)); data/getdns-1.6.0/src/mdns.c:1371:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ipv6_dest.sin6_addr data/getdns-1.6.0/src/mdns.c:1417:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mcast_dest, &ipv6_dest, sizeof(ipv6_dest)); data/getdns-1.6.0/src/mdns.c:2012:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, ((uint8_t *)entry->data) + sizeof(getdns_mdns_cached_record_header), data/getdns-1.6.0/src/openssl/keyraw-internal.c:262:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char encoded[37+64]; data/getdns-1.6.0/src/openssl/keyraw-internal.c:282:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[256+2]; /* sufficient for 2*384/8+1 */ data/getdns-1.6.0/src/openssl/pubkey-pinning-internal.c:74:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char inbuf[B64_ENCODED_SHA256_LENGTH + 1]; data/getdns-1.6.0/src/openssl/pubkey-pinning-internal.c:78:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(inbuf, str, B64_ENCODED_SHA256_LENGTH); data/getdns-1.6.0/src/openssl/tls.c:83:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8192]; data/getdns-1.6.0/src/openssl/tls.c:95:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "<unknown>"); data/getdns-1.6.0/src/openssl/tls.c:337: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:373: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:388:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:457: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:487: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:520: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:552:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:577: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:656:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:721: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:743: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:776: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 ssl_err[256]; data/getdns-1.6.0/src/openssl/tls.c:937: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. const char *auth_names[2] = { auth_name, NULL }; data/getdns-1.6.0/src/openssl/tls.c:1165:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(bindata->data, buf, len); data/getdns-1.6.0/src/platform.c:43: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 msg[256]; data/getdns-1.6.0/src/platform.c:56:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(msg, "Unknown error: %d", errid); data/getdns-1.6.0/src/platform.c:64: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. static char unknown[32]; data/getdns-1.6.0/src/pubkey-pinning.c:240:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(onext->pin, data->data, SHA256_DIGEST_LENGTH); data/getdns-1.6.0/src/request-internal.c:157:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buf, net_req->owner->name, net_req->owner->name_len); data/getdns-1.6.0/src/request-internal.c:192:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(net_req->transports, owner->context->dns_transports, data/getdns-1.6.0/src/request-internal.c:282:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buf + 4, option_data->data, data/getdns-1.6.0/src/request-internal.c:336:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(base_opt_backup, netreq->opt, base_opt_rr_sz); data/getdns-1.6.0/src/request-internal.c:338:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(netreq->opt, base_opt_backup, base_opt_rr_sz); data/getdns-1.6.0/src/request-internal.c:384:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(req->opt + 11 + oldlen + 4, data, sz); data/getdns-1.6.0/src/request-internal.c:869:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(suffixes, context->suffixes, context->suffixes_len); data/getdns-1.6.0/src/request-internal.c:898:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(result->name + result->name_len - 1, data/getdns-1.6.0/src/rr-dict.c:122:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(rdf, value->data, value->size); data/getdns-1.6.0/src/rr-dict.c:228:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, 4); data/getdns-1.6.0/src/rr-dict.c:237:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, 16); data/getdns-1.6.0/src/rr-dict.c:247:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, value->size); data/getdns-1.6.0/src/rr-dict.c:358:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, value->size); data/getdns-1.6.0/src/rr-dict.c:413:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, value->size); data/getdns-1.6.0/src/rr-dict.c:592:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, 4); data/getdns-1.6.0/src/rr-dict.c:601:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, 16); data/getdns-1.6.0/src/rr-dict.c:611:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(rdf, value->data, value->size); data/getdns-1.6.0/src/rr-iter.c:201:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(dst, start, pos - start); data/getdns-1.6.0/src/server.c:384:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(to_write->write_buf + 2, buf, len); data/getdns-1.6.0/src/server.c:663: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 addrbuf[100]; data/getdns-1.6.0/src/server.c:664: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 hexbuf[4096], *hexptr; data/getdns-1.6.0/src/server.c:1015: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 addrstr[1024], *eos; data/getdns-1.6.0/src/server.c:1048:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(eos, scope_id->data, scope_id->size); data/getdns-1.6.0/src/server.c:1052:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char portstr[1024]; data/getdns-1.6.0/src/server.c:1078:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(&l->addr, ai->ai_addr, ai->ai_addrlen); data/getdns-1.6.0/src/ssl_dane/danessl.c:157: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 data[0]; data/getdns-1.6.0/src/ssl_dane/danessl.c:235:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mdbuf[EVP_MAX_MD_SIZE]; data/getdns-1.6.0/src/ssl_dane/danessl.c:1338:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(d->value->data, data, dlen); data/getdns-1.6.0/src/stub.c:125: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 md_value[GETDNS_TLS_MAX_DIGEST_LENGTH]; data/getdns-1.6.0/src/stub.c:185:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( upstream->prev_client_cookie data/getdns-1.6.0/src/stub.c:198:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, upstream->client_cookie, 8); data/getdns-1.6.0/src/stub.c:199:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf+8, upstream->server_cookie, upstream->server_cookie_len); data/getdns-1.6.0/src/stub.c:240:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str_spc[8192], *str = str_spc; data/getdns-1.6.0/src/stub.c:307:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(upstream->server_cookie, position, option_len); data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.c:132:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). !(test_port = (uint16_t)atoi(test_port_str))) data/getdns-1.6.0/src/test/check_getdns_dict_get_data_type.h:83:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *keys[3] = { "ten", "eleven", "twelve" }; data/getdns-1.6.0/src/test/check_getdns_dict_get_dict.h:88:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *keys[3] = { "ten", "eleven", "twelve" }; data/getdns-1.6.0/src/test/check_getdns_dict_get_dict.h:174:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *keys[3] = { "ten", "eleven", "twelve" }; data/getdns-1.6.0/src/test/check_getdns_dict_get_list.h:85:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *keys[3] = { "ten", "eleven", "twelve" }; data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h:80:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *keys[3] = { "ten", "eleven", "twelve" }; data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h:85:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char string_buffer[20] = ""; data/getdns-1.6.0/src/test/check_getdns_transport.c:56:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). !(test_port = (uint16_t)atoi(test_port_str))) data/getdns-1.6.0/src/test/tests_dict.c:50:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_dict.c:51:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[20]; data/getdns-1.6.0/src/test/tests_dict.c:63:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:96:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:131:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_dict.c:132:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[20]; data/getdns-1.6.0/src/test/tests_dict.c:146:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:179:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:304:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_dict.c:305:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[20]; data/getdns-1.6.0/src/test/tests_dict.c:319:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:352:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:387:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_dict.c:388:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[20]; data/getdns-1.6.0/src/test/tests_dict.c:401:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:434:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "foo"); data/getdns-1.6.0/src/test/tests_dict.c:449:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(key, "bar"); data/getdns-1.6.0/src/test/tests_list.c:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_list.c:128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_list.c:201:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_list.c:276:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/test/tests_list.c:343:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[TSTMSGBUF]; data/getdns-1.6.0/src/tls/anchor-internal.c:94:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/getdns-1.6.0/src/tls/anchor-internal.c:361:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(context->trust_anchors_spc, ta_spc, ta_len); data/getdns-1.6.0/src/tls/val_secalgo.c:88:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/getdns-1.6.0/src/tls/val_secalgo.c:949:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[256+2]; /* sufficient for 2*384/8+1 */ data/getdns-1.6.0/src/tls/val_secalgo.c:1254:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hash[HASH_LENGTH_MAX]; data/getdns-1.6.0/src/tls/val_secalgo.c:1255:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hash2[HASH_LENGTH_MAX*2]; data/getdns-1.6.0/src/tls/val_secalgo.c:1321:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sechash.data, prefix, prefixlen); data/getdns-1.6.0/src/tools/getdns_query.c:65:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char name[2048] = "."; data/getdns-1.6.0/src/tools/getdns_query.c:92:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024] = "GETDNS_RRTYPE_"; data/getdns-1.6.0/src/tools/getdns_query.c:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024] = "GETDNS_RRCLASS_"; data/getdns-1.6.0/src/tools/getdns_query.c:532:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fh = fopen(fn, "r"))) { data/getdns-1.6.0/src/tools/getdns_query.c:667:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(name, arg, arg_len); data/getdns-1.6.0/src/tools/getdns_query.c:723: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). if (!(fh = fopen(argv[i], "r"))) { data/getdns-1.6.0/src/tools/getdns_query.c:861: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). if (!(fh = fopen(argv[i], "r"))) { data/getdns-1.6.0/src/tools/getdns_query.c:1284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1024], *token, *linev[256]; data/getdns-1.6.0/src/tools/getdns_query.c:1407:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char remove_str[100] = "/replies_tree/0/additional/"; data/getdns-1.6.0/src/tools/getdns_query.c:1668: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 getdns_version[100] = "getdns "; data/getdns-1.6.0/src/tools/getdns_query.c:1669: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 getdns_api_version[100] = "getdns API "; data/getdns-1.6.0/src/tools/getdns_query.c:1748:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/getdns-1.6.0/src/tools/getdns_query.c:1858:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(query_file, "rt"); data/getdns-1.6.0/src/tools/getdns_server_mon.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 base_output[MAX_BASE_OUTPUT_LEN + 1]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:102: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 perf_output[MAX_PERF_OUTPUT_LEN + 1]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:124: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 buf[128] = "GETDNS_RRTYPE_"; data/getdns-1.6.0/src/tools/getdns_server_mon.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 buf[128]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:151:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 res[20]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:266: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 buf[40]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:282: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 month[4]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:283: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 tz[4]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:455:25: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Empty name not valid"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:583:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Search timed out"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:587:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "No secure answers"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:591:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "All answers are bogus"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:735:25: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Cannot parse PKIX certificate"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:740:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-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[25]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:814: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 buf[40]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:887:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Answer does not contain expected type"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:963:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Lookup succeeded"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1014:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Authentication failed"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1017:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Authentication succeeded"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1043:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "No PKIX certificate"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1059:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Certificate expires today"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1080:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "qname-min takes no arguments"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1132:25: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "No answer text"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1139:33: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "QNAME minimisation ON"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1143:33: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "QNAME minimisation OFF"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1153:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "No valid QNAME minimisation data"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1285:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "No padding found"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1362:25: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server sent keepalive, idle timeout now (overflow)"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1371:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server did not send keepalive"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1380:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "dnssec-validate takes no arguments"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1401:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Search timed out"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1406:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server does NOT validate DNSSEC"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1449:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Search timed out"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1454:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server error - cannot determine DNSSEC status"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1458:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server validates DNSSEC"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1469:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "tls-1.3 takes no arguments"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1497:33: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Your version of OpenSSL does not support TLS 1.3 ciphers. You need at least OpenSSL 1.1.1."); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1500:33: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Cannot establish TLS 1.3 connection."); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1548:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server does not support TLS 1.3"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1555:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Server supports TLS 1.3"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1604:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "OOOR takes no arguments"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1617: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 delay_name[50]; data/getdns-1.6.0/src/tools/getdns_server_mon.c:1675:25: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Query did not complete"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1681:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Responses are in query order"); data/getdns-1.6.0/src/tools/getdns_server_mon.c:1684:17: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(test_info->base_output, "Responses are not in query order"); data/getdns-1.6.0/src/util-internal.c:101:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(addr->sin_addr), address_data->data, data/getdns-1.6.0/src/util-internal.c:108:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&(addr->sin6_addr), address_data->data, data/getdns-1.6.0/src/util-internal.c:177:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bin_data = memcpy(ff_bytes, bin_data, bin_size); data/getdns-1.6.0/src/util-internal.c:275: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. bin_data = memcpy(ff_bytes, bin_data, bin_size); data/getdns-1.6.0/src/util-internal.c:1417:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(netreq->response, pkt, data/getdns-1.6.0/src/util-internal.c:1445:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy( netreq->response + GLDNS_HEADER_SIZE data/getdns-1.6.0/src/yxml/yxml.c:124:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dest, &_ch, 1); data/getdns-1.6.0/src/yxml/yxml.h:96:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[8]; data/getdns-1.6.0/stubby/macos/stubby-ui-helper.c:197: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 authbuf[80]; data/getdns-1.6.0/stubby/src/sldns/sbuffer.c:61:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer->_data, data, size); data/getdns-1.6.0/stubby/src/sldns/sbuffer.h:474:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer->_data + at, data, data/getdns-1.6.0/stubby/src/sldns/sbuffer.h:478:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer->_data + at, data, count); data/getdns-1.6.0/stubby/src/sldns/sbuffer.h:656:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, buffer->_data + at, count); data/getdns-1.6.0/stubby/src/stubby.c:92: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. char buf_dEbUgSyM[10]; \ data/getdns-1.6.0/stubby/src/stubby.c:105:2: [2] (buffer) TCHAR: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. TCHAR szPath[MAX_PATH]; data/getdns-1.6.0/stubby/src/stubby.c:130: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. char buf_dEbUgSyM[10]; \ data/getdns-1.6.0/stubby/src/stubby.c:313:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fh = fopen(fn, "r"))) data/getdns-1.6.0/stubby/src/stubby.c:402:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char remove_str[100] = "/replies_tree/0/additional/"; data/getdns-1.6.0/stubby/src/stubby.c:442:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char i_as_jptr[80]; data/getdns-1.6.0/stubby/src/stubby.c:739:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[10]; data/getdns-1.6.0/stubby/src/stubby.c:943: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 pid_str[1024], *endptr; data/getdns-1.6.0/stubby/src/stubby.c:944: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). FILE *fh = fopen(STUBBYPIDFILE, "r"); data/getdns-1.6.0/stubby/src/stubby.c:971:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fh = fopen(STUBBYPIDFILE, "w"); data/getdns-1.6.0/src/anchor.c:73:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t to_copy = strlen(src); data/getdns-1.6.0/src/anchor.c:711:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (!(verify_CA.size = strlen((const char *)verify_CA.data))) data/getdns-1.6.0/src/anchor.c:776:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(a->fd, a->tcp.read_pos, a->tcp.to_read); data/getdns-1.6.0/src/anchor.c:972:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hostname, url + 7, next_slash - url - 7); data/getdns-1.6.0/src/anchor.c:976: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). *path = url + strlen(url); data/getdns-1.6.0/src/anchor.c:977:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hostname, url + 7, 254); data/getdns-1.6.0/src/anchor.c:980:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). s = strlen(hostname); data/getdns-1.6.0/src/anchor.c:1076: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). hostname_len = strlen(tas_hostname); data/getdns-1.6.0/src/anchor.c:1079: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). path_len = strlen(path); data/getdns-1.6.0/src/compat/arc4random.c:123:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, (char*)buf + i, wanted); data/getdns-1.6.0/src/compat/getentropy_linux.c:272:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, (char*)buf + i, wanted); data/getdns-1.6.0/src/compat/getentropy_osx.c:191:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, (char*)buf + i, wanted); data/getdns-1.6.0/src/compat/getentropy_solaris.c:207:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t ret = read(fd, (char*)buf + i, wanted); data/getdns-1.6.0/src/compat/inet_ntop.c:187:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tp += strlen(tp); data/getdns-1.6.0/src/compat/mkstemp.c:40:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (_mktemp_s(template, strlen(template) + 1) != 0) data/getdns-1.6.0/src/compat/sha512.c:95:32: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. #error Define BYTE_ORDER to be equal to either LITTLE_ENDIAN or BIG_ENDIAN data/getdns-1.6.0/src/compat/strptime.c:78:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(strs[i]); data/getdns-1.6.0/src/context.c:1000: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 ((strlen(lszValue)) > 0) { data/getdns-1.6.0/src/context.c:2548:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) memcpy(context->root_servers_fn, tmpfn, strlen(tmpfn)); data/getdns-1.6.0/src/context.c:2830: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(addrstr) + scope_id->size > 1022) data/getdns-1.6.0/src/context.c:2832:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). eos = &addrstr[strlen(addrstr)]; data/getdns-1.6.0/src/context.c:3377:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) snprintf(buf + strlen(buf), len - strlen(buf), data/getdns-1.6.0/src/context.c:3377:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) snprintf(buf + strlen(buf), len - strlen(buf), data/getdns-1.6.0/src/context.c:3380:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) snprintf(buf + strlen(buf), len - strlen(buf), data/getdns-1.6.0/src/context.c:3380:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void) snprintf(buf + strlen(buf), len - strlen(buf), data/getdns-1.6.0/src/context.c:3681:54: [1] (buffer) strlen: Does not handle 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 (!s || !(r = GETDNS_XMALLOC(*mfs, char, (sz = strlen(s) + 1)))) data/getdns-1.6.0/src/context.c:4522:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) != name->size) data/getdns-1.6.0/src/context.c:4790:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(path); data/getdns-1.6.0/src/context.c:4798: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). else if ((len = strlen(path)) data/getdns-1.6.0/src/context.c:4811:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(path); data/getdns-1.6.0/src/context.c:4818: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). else if ((len = strlen(home)) + sizeof(APPDATA_SUBDIR) + 2 >= _GETDNS_PATH_MAX) data/getdns-1.6.0/src/context.c:4867:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len + strlen(fn) >= sizeof(path)) data/getdns-1.6.0/src/context.c:4940: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). || len + strlen(fn) >= sizeof(path)) data/getdns-1.6.0/src/context.c:5023:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len + strlen(test_fn) >= sizeof(path)) data/getdns-1.6.0/src/context.c:5059: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). path_len = strlen(path); data/getdns-1.6.0/src/convert.c:1612:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = jsmn_parse(&p, str, strlen(str), tok, tokcount); data/getdns-1.6.0/src/convert.c:1646:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) > sizeof(value_str) - 1) data/getdns-1.6.0/src/convert.c:1649:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void)strncpy(value_buf, str, sizeof(value_buf)); data/getdns-1.6.0/src/dict.c:127:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = strlen(jptr) + 1; data/getdns-1.6.0/src/dict.c:669: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). &dict->mf, strlen(value) + 1, (uint8_t *)value))) data/getdns-1.6.0/src/extension/libev.c:71:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ev_io read; data/getdns-1.6.0/src/extension/libev.c:85:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ev_io_stop(ext->loop, &my_ev->read); data/getdns-1.6.0/src/extension/libev.c:143:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). my_io = &my_ev->read; data/getdns-1.6.0/src/extension/libuv.c:76:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). uv_poll_t read; data/getdns-1.6.0/src/extension/libuv.c:115:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). my_poll = &my_ev->read; data/getdns-1.6.0/src/extension/libuv.c:210:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). my_poll = &my_ev->read; data/getdns-1.6.0/src/general.c:792:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ( strlen(GETDNS_STR_IPV4) < address_type->size data/getdns-1.6.0/src/general.c:793:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? strlen(GETDNS_STR_IPV4) : address_type->size )) == 0 data/getdns-1.6.0/src/general.c:796:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ( strlen(GETDNS_STR_IPV6) < address_type->size data/getdns-1.6.0/src/general.c:797:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? strlen(GETDNS_STR_IPV6) : address_type->size )) == 0 data/getdns-1.6.0/src/gldns/gbuffer.h:524:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_write_at(buffer, at, str, strlen(str)); data/getdns-1.6.0/src/gldns/gbuffer.h:535:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_write(buffer, str, strlen(str)); data/getdns-1.6.0/src/gldns/parse.c:63:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getc(f)) != EOF) { data/getdns-1.6.0/src/gldns/parse.c:202:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(keyword) >= GLDNS_MAX_KEYWORDLEN) data/getdns-1.6.0/src/gldns/parse.c:433:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) { data/getdns-1.6.0/src/gldns/parse.c:459:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(keyword) >= GLDNS_MAX_KEYWORDLEN) data/getdns-1.6.0/src/gldns/parse.c:472:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(fkeyword, keyword, strlen(keyword)) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:716:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) > 4 && strncasecmp(name, "TYPE", 4) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:725:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(name) == strlen(desc_name) && data/getdns-1.6.0/src/gldns/rrdef.c:725:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(name) == strlen(desc_name) && data/getdns-1.6.0/src/gldns/rrdef.c:726:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncasecmp(name, desc_name, strlen(desc_name)) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:733:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) == 4 && strncasecmp(name, "IXFR", 4) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:735:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(name) == 4 && strncasecmp(name, "AXFR", 4) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:737:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(name) == 5 && strncasecmp(name, "MAILB", 5) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:739:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(name) == 5 && strncasecmp(name, "MAILA", 5) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:741:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). } else if (strlen(name) == 3 && strncasecmp(name, "ANY", 3) == 0) { data/getdns-1.6.0/src/gldns/rrdef.c:754:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) > 5 && strncasecmp(name, "CLASS", 5) == 0) { data/getdns-1.6.0/src/gldns/str2wire.c:50:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen((char*)str); data/getdns-1.6.0/src/gldns/str2wire.c:240:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_position(strbuf)-strlen(token)); data/getdns-1.6.0/src/gldns/str2wire.c:258:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(token) > 0 && !isdigit((unsigned char)token[0])) { data/getdns-1.6.0/src/gldns/str2wire.c:459:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_position(strbuf)-strlen(token)); data/getdns-1.6.0/src/gldns/str2wire.c:509:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_position(strbuf)-strlen(token)); data/getdns-1.6.0/src/gldns/str2wire.c:520: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). size_t tlen = strlen(token); data/getdns-1.6.0/src/gldns/str2wire.c:533:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_position(strbuf)-strlen(token)); data/getdns-1.6.0/src/gldns/str2wire.c:559:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(token); data/getdns-1.6.0/src/gldns/str2wire.c:590:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(token); data/getdns-1.6.0/src/gldns/str2wire.c:747:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_init_frm_data(&strbuf, (uint8_t*)str, strlen(str)); data/getdns-1.6.0/src/gldns/str2wire.c:1142:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(my_str) < 2 data/getdns-1.6.0/src/gldns/str2wire.c:1210:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t sz = gldns_b64_pton_calculate_size(strlen(str)); data/getdns-1.6.0/src/gldns/str2wire.c:1227:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(str); data/getdns-1.6.0/src/gldns/str2wire.c:1293:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_init_frm_data(&strbuf, (uint8_t*)str, strlen(str)); data/getdns-1.6.0/src/gldns/str2wire.c:1428:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) == 14 && sscanf(str, "%4d%2d%2d%2d%2d%2d", data/getdns-1.6.0/src/gldns/str2wire.c:1668:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(my_str) > 0) { data/getdns-1.6.0/src/gldns/str2wire.c:1673:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(my_str) > 0) { data/getdns-1.6.0/src/gldns/str2wire.c:1678:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(my_str) > 0) { data/getdns-1.6.0/src/gldns/str2wire.c:1713:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_init_frm_data(&strbuf, (uint8_t*)str, strlen(str)); data/getdns-1.6.0/src/gldns/str2wire.c:1798:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(s); data/getdns-1.6.0/src/gldns/str2wire.c:1825:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(str); data/getdns-1.6.0/src/gldns/str2wire.c:1860:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_init_frm_data(&strbuf, (uint8_t*)str, strlen(str)); data/getdns-1.6.0/src/gldns/str2wire.c:1928: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). int i, salt_length_str = (int)strlen(str); data/getdns-1.6.0/src/gldns/str2wire.c:1961:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l != (int)strlen(str) || /* more data to read */ data/getdns-1.6.0/src/gldns/str2wire.c:1983:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l != (int)strlen(str)) data/getdns-1.6.0/src/gldns/str2wire.c:2004:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l != (int)strlen(str)) data/getdns-1.6.0/src/gldns/str2wire.c:2020:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t slen = strlen(str); data/getdns-1.6.0/src/gldns/str2wire.c:2143:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gldns_buffer_init_frm_data(&strbuf, (uint8_t*)str, strlen(str)); data/getdns-1.6.0/src/gnutls/tls.c:74:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = GETDNS_XMALLOC(*mfs, char, strlen(s) + 1); data/getdns-1.6.0/src/gnutls/tls.c:90:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = GETDNS_XMALLOC(*mfs, char, strlen(s1) + strlen(s2) + 2); data/getdns-1.6.0/src/gnutls/tls.c:90:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = GETDNS_XMALLOC(*mfs, char, strlen(s1) + strlen(s2) + 2); data/getdns-1.6.0/src/gnutls/tls.c:94:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(res, ":"); data/getdns-1.6.0/src/gnutls/tls.c:552:68: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). r = gnutls_server_name_set(conn->tls, GNUTLS_NAME_DNS, auth_name, strlen(auth_name)); data/getdns-1.6.0/src/gnutls/tls.c:733:113: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getdns_return_t _getdns_tls_connection_read(_getdns_tls_connection* conn, uint8_t* buf, size_t to_read, size_t* read) data/getdns-1.6.0/src/gnutls/tls.c:737:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!conn || !conn->tls || !read) data/getdns-1.6.0/src/list.c:615: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). &list->mf, strlen(value) + 1, (uint8_t *)value))) data/getdns-1.6.0/src/mdns.c:1121:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read; data/getdns-1.6.0/src/mdns.c:1138:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read >= GLDNS_HEADER_SIZE) data/getdns-1.6.0/src/mdns.c:1167:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (current_index < read && nb_queries_skipped < nb_queries) data/getdns-1.6.0/src/mdns.c:1177:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (current_index < read && nb_records < nb_responses) data/getdns-1.6.0/src/mdns.c:1180:56: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). current_index = mdns_util_copy_name(cnx->response, read, current_index, data/getdns-1.6.0/src/mdns.c:1182:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (current_index + 12 >= read) data/getdns-1.6.0/src/mdns.c:1185:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). current_index = read; data/getdns-1.6.0/src/mdns.c:1202:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (current_index + record_data_len <= read) data/getdns-1.6.0/src/mdns.c:1213:56: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (void) mdns_util_canonical_record(cnx->response, read, data/getdns-1.6.0/src/mdns.c:1230:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). current_index = read; data/getdns-1.6.0/src/mdns.c:1237:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (current_index < read && signalled_records < nb_responses) data/getdns-1.6.0/src/mdns.c:1240:56: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). current_index = mdns_util_copy_name(cnx->response, read, current_index, data/getdns-1.6.0/src/mdns.c:1242:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (current_index + 12 >= read) data/getdns-1.6.0/src/mdns.c:1245:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). current_index = read; data/getdns-1.6.0/src/mdns.c:1694:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read; data/getdns-1.6.0/src/mdns.c:1712:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read < GLDNS_HEADER_SIZE) data/getdns-1.6.0/src/mdns.c:1730:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). netreq->response_len = read; data/getdns-1.6.0/src/openssl/tls.c:990:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(conn->auth_name), data/getdns-1.6.0/src/openssl/tls.c:1040:113: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getdns_return_t _getdns_tls_connection_read(_getdns_tls_connection* conn, uint8_t* buf, size_t to_read, size_t* read) data/getdns-1.6.0/src/openssl/tls.c:1044:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!conn || !conn->ssl || !read) data/getdns-1.6.0/src/request-internal.c:872:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(name) || name[strlen(name)-1] == '.' || data/getdns-1.6.0/src/request-internal.c:872:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(name) || name[strlen(name)-1] == '.' || data/getdns-1.6.0/src/server.c:672:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(addrbuf); data/getdns-1.6.0/src/server.c:678:12: [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. (void) strncpy( data/getdns-1.6.0/src/server.c:688:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l = strlen(addrbuf); data/getdns-1.6.0/src/server.c:694:12: [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. (void) strncpy( data/getdns-1.6.0/src/server.c:698:11: [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. (void) strncpy( data/getdns-1.6.0/src/server.c:1042: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(addrstr) + scope_id->size > 1022) { data/getdns-1.6.0/src/server.c:1046:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). eos = &addrstr[strlen(addrstr)]; data/getdns-1.6.0/src/ssl_dane/danessl.c:730:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((idlen = strlen(certid)) > (domlen = strlen(domain)) + 1 data/getdns-1.6.0/src/ssl_dane/danessl.c:730:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((idlen = strlen(certid)) > (domlen = strlen(domain)) + 1 data/getdns-1.6.0/src/ssl_dane/danessl.c:746:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (idlen = strlen(certid + 1)) <= (domlen = strlen(parent)) data/getdns-1.6.0/src/ssl_dane/danessl.c:746:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (idlen = strlen(certid + 1)) <= (domlen = strlen(parent)) data/getdns-1.6.0/src/stub.c:674:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read; data/getdns-1.6.0/src/stub.c:688:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read < 0) { data/getdns-1.6.0/src/stub.c:697:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). } else if ((size_t)read > tcp->to_read) { data/getdns-1.6.0/src/stub.c:700:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tcp->to_read -= read; data/getdns-1.6.0/src/stub.c:701:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tcp->read_pos += read; data/getdns-1.6.0/src/stub.c:1125:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read; data/getdns-1.6.0/src/stub.c:1144:89: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getdns_return_t r = _getdns_tls_connection_read(tls_obj, tcp->read_pos, tcp->to_read, &read); data/getdns-1.6.0/src/stub.c:1152:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tcp->to_read -= read; data/getdns-1.6.0/src/stub.c:1153:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tcp->read_pos += read; data/getdns-1.6.0/src/stub.c:1182:83: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). switch ((int)_getdns_tls_connection_read(tls_obj, tcp->read_pos, tcp->to_read, &read)) { data/getdns-1.6.0/src/stub.c:1194:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tcp->to_read -= read; data/getdns-1.6.0/src/stub.c:1195:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). tcp->read_pos += read; data/getdns-1.6.0/src/stub.c:1349:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t read; data/getdns-1.6.0/src/stub.c:1382:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read < GLDNS_HEADER_SIZE) data/getdns-1.6.0/src/stub.c:1389:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). upstream, netreq->response, read)) data/getdns-1.6.0/src/stub.c:1418:25: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). netreq->response_len = read; data/getdns-1.6.0/src/test/check_getdns_context_set_timeout.c:320: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). bindata.size = strlen(GETDNS_STR_IPV4) + 1; data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h:108:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(string_buffer) + strlen((char*)key->data) + 1 data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h:108:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(string_buffer) + strlen((char*)key->data) + 1 data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h:110:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(string_buffer+strlen(string_buffer), key->data, data/getdns-1.6.0/src/test/check_getdns_dict_get_names.h:111:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen((char*)key->data)+1); data/getdns-1.6.0/src/test/check_getdns_transport.c:132:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(conn, tcplength, 2); data/getdns-1.6.0/src/test/check_getdns_transport.c:134:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). n = read(conn, mesg, 65536); data/getdns-1.6.0/src/test/check_getdns_transport.c:252: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). bindata.size = strlen(GETDNS_STR_IPV4) + 1; data/getdns-1.6.0/src/test/check_getdns_transport.c:326: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). bindata.size = strlen(GETDNS_STR_IPV4) + 1; data/getdns-1.6.0/src/test/check_getdns_transport.c:400: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). bindata.size = strlen(GETDNS_STR_IPV4) + 1; data/getdns-1.6.0/src/test/check_getdns_transport.c:478: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). bindata.size = strlen(GETDNS_STR_IPV4) + 1; data/getdns-1.6.0/src/test/tests_dict.c:99: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). bindata->size = strlen("foobar") + 1; data/getdns-1.6.0/src/test/tests_list.c:104: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). new_bindata.size = strlen("foobar") + 1; data/getdns-1.6.0/src/tls.h:344:113: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). getdns_return_t _getdns_tls_connection_read(_getdns_tls_connection* conn, uint8_t* buf, size_t to_read, size_t* read); data/getdns-1.6.0/src/tools/getdns_query.c:98:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(t) > sizeof(buf) - 15) data/getdns-1.6.0/src/tools/getdns_query.c:123:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(t) > sizeof(buf) - 16) data/getdns-1.6.0/src/tools/getdns_query.c:147:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ; i < max_transports && i < strlen(transport_list_str) data/getdns-1.6.0/src/tools/getdns_query.c:660: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). size_t arg_len = strlen(arg); data/getdns-1.6.0/src/tools/getdns_query.c:996: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). bindata.size = strlen(suffix); data/getdns-1.6.0/src/tools/getdns_query.c:1683:10: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. (void) strncat(getdns_version + 7, data/getdns-1.6.0/src/tools/getdns_query.c:1692:10: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. (void) strncat(getdns_api_version + 11, data/getdns-1.6.0/src/tools/getdns_server_mon.c:111: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). int l = strlen(buf); data/getdns-1.6.0/src/tools/getdns_server_mon.c:130: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(t) > sizeof(buf) - 15) data/getdns-1.6.0/src/tools/getdns_server_mon.c:162:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(prefix); data/getdns-1.6.0/src/tools/getdns_server_mon.c:285:13: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (sscanf(buf, data/getdns-1.6.0/src/tools/getdns_server_mon.c:452: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 (strlen(**av) > 0) { data/getdns-1.6.0/src/tools/getdns_server_mon.c:1983: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). strlen(test_info.perf_output) > 0) { data/getdns-1.6.0/src/util-internal.c:96:3: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(GETDNS_STR_IPV4)) == 0) { data/getdns-1.6.0/src/util-internal.c:1470:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(dname); data/getdns-1.6.0/stubby/src/sldns/sbuffer.h:527:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sldns_buffer_write_at(buffer, at, str, strlen(str)); data/getdns-1.6.0/stubby/src/sldns/sbuffer.h:538:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sldns_buffer_write(buffer, str, strlen(str)); data/getdns-1.6.0/stubby/src/stubby.c:78:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int reslen = strlen(dir) + strlen(fname) + 1; data/getdns-1.6.0/stubby/src/stubby.c:78:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int reslen = strlen(dir) + strlen(fname) + 1; data/getdns-1.6.0/stubby/src/yaml/convert_yaml_to_json.c:88:71: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). yaml_parser_set_input_string(&parser, (const unsigned char *) instr, strlen(instr)); ANALYSIS SUMMARY: Hits = 643 Lines analyzed = 80177 in approximately 2.17 seconds (36910 lines/second) Physical Source Lines of Code (SLOC) = 55179 Hits@level = [0] 615 [1] 186 [2] 378 [3] 14 [4] 65 [5] 0 Hits@level+ = [0+] 1258 [1+] 643 [2+] 457 [3+] 79 [4+] 65 [5+] 0 Hits/KSLOC@level+ = [0+] 22.7985 [1+] 11.653 [2+] 8.28214 [3+] 1.4317 [4+] 1.17798 [5+] 0 Dot directories skipped = 2 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.