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/pycares-3.1.1/deps/c-ares/src/ares.h Examining data/pycares-3.1.1/deps/c-ares/src/ares__close_sockets.c Examining data/pycares-3.1.1/deps/c-ares/src/ares__get_hostent.c Examining data/pycares-3.1.1/deps/c-ares/src/ares__read_line.c Examining data/pycares-3.1.1/deps/c-ares/src/ares__timeval.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_android.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_android.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_build.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_cancel.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_create_query.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_data.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_data.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_destroy.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_dns.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_expand_name.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_expand_string.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_fds.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_free_hostent.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_free_string.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_getenv.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_getenv.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_getopt.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_getopt.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_getsock.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_inet_net_pton.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_init.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_iphlpapi.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_ipv6.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_library_init.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_library_init.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_llist.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_llist.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_mkquery.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_nowarn.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_nowarn.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_options.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_a_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_aaaa_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_mx_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_naptr_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_ns_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_ptr_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_soa_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_srv_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_parse_txt_reply.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_platform.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_platform.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_private.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_process.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_query.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_rules.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_search.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_send.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_setup.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_strcasecmp.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_strcasecmp.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_strdup.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_strdup.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_strerror.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_strsplit.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_strsplit.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_timeout.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_version.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_version.h Examining data/pycares-3.1.1/deps/c-ares/src/ares_writev.c Examining data/pycares-3.1.1/deps/c-ares/src/ares_writev.h Examining data/pycares-3.1.1/deps/c-ares/src/bitncmp.c Examining data/pycares-3.1.1/deps/c-ares/src/bitncmp.h Examining data/pycares-3.1.1/deps/c-ares/src/config-win32.h Examining data/pycares-3.1.1/deps/c-ares/src/config_android/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_cygwin/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_darwin/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_freebsd/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_linux/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_netbsd/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_openbsd/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/config_sunos/ares_config.h Examining data/pycares-3.1.1/deps/c-ares/src/inet_net_pton.c Examining data/pycares-3.1.1/deps/c-ares/src/inet_net_pton.h Examining data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c Examining data/pycares-3.1.1/deps/c-ares/src/inet_ntop.h Examining data/pycares-3.1.1/deps/c-ares/src/nameser.h Examining data/pycares-3.1.1/deps/c-ares/src/setup_once.h Examining data/pycares-3.1.1/deps/c-ares/src/windows_port.c FINAL RESULTS: data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:208:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(PATH_HOSTS, WIN_PATH_HOSTS); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:380:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(PATH_HOSTS, WIN_PATH_HOSTS); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:410:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&buf[bufl], tmpbuf); data/pycares-3.1.1/deps/c-ares/src/ares_options.c:275:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(csv, _csv); data/pycares-3.1.1/deps/c-ares/src/ares_parse_ns_reply.c:135:7: [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(nameservers[nameservers_num],rr_data); data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:93:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. if ((size_t)sprintf(tmp, fmt, src[0], src[1], src[2], src[3]) >= size) { data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:97:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dst, tmp); data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:194:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dst, tmp); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:119:21: [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. const char *env = getenv("CARES_MEMDEBUG"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:123:9: [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. env = getenv("CARES_MEMLIMIT"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:564:17: [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. localdomain = getenv("LOCALDOMAIN"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:572:17: [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. res_options = getenv("RES_OPTIONS"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1495:10: [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. line = getenv("Inet$Resolvers"); data/pycares-3.1.1/deps/c-ares/src/ares_private.h:100:11: [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. # define getenv(ptr) ares_getenv(ptr) data/pycares-3.1.1/deps/c-ares/src/ares_search.c:258:21: [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. hostaliases = getenv("HOSTALIASES"); data/pycares-3.1.1/deps/c-ares/src/ares.h:496: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 _S6_u8[16]; data/pycares-3.1.1/deps/c-ares/src/ares__get_hostent.c:189:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(hostent->h_addr_list[0], &addr.addrV4, sizeof(addr.addrV4)); data/pycares-3.1.1/deps/c-ares/src/ares__get_hostent.c:191:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(hostent->h_addr_list[0], &addr.addrV6, sizeof(addr.addrV6)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:105:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:182: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 PATH_HOSTS[MAX_PATH]; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:190: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 tmp[MAX_PATH]; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:218: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(PATH_HOSTS, "r"); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:274:8: [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(name, "%lu.%lu.%lu.%lu.in-addr.arpa", a4, a3, a2, a1); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:281:8: [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(name, data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:287:8: [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(name+strlen(name), data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:248: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 *aliases[1] = { NULL }; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:249: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 *addrs[2]; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:354: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 PATH_HOSTS[MAX_PATH]; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:362: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 tmp[MAX_PATH]; data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:390: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(PATH_HOSTS, "r"); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:442:7: [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(&a1, host->h_addr_list[i1], sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:446: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. memcpy(&a2, host->h_addr_list[i2], sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:450: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. memcpy(host->h_addr_list[i2 + 1], &a2, sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:452:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(host->h_addr_list[i2 + 1], &a1, sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:498:7: [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(&a1, host->h_addr_list[i1], sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:502: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. memcpy(&a2, host->h_addr_list[i2], sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:506: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. memcpy(host->h_addr_list[i2 + 1], &a2, sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyname.c:508:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(host->h_addr_list[i2 + 1], &a1, sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:117: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 buf[33], *service; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:131: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 ipbuf[IPBUFSIZ]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:132: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 srvbuf[33]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:200: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 srvbuf[33]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:223:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[255]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:243: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 ipbuf[IPBUFSIZ]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:283: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 tmpbuf[4096]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:336:11: [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(tmpbuf, "%u", (unsigned int)ntohs(port)); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:342:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, name, name_len + 1); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:359: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 tmpbuf[IF_NAMESIZE + 2]; data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:373:11: [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(&tmpbuf[1], "%lu", (unsigned long)addr6->sin6_scope_id); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:377:11: [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(&tmpbuf[1], "%u", (unsigned int)addr6->sin6_scope_id); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:386:15: [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(&tmpbuf[1], "%lu", (unsigned long)addr6->sin6_scope_id); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:390:15: [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(&tmpbuf[1], "%u", (unsigned int)addr6->sin6_scope_id); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:397:7: [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(&tmpbuf[1], "%lu", (unsigned long)addr6->sin6_scope_id); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:401:7: [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(&tmpbuf[1], "%u", (unsigned int)addr6->sin6_scope_id); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:303: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((*dest)->local_ip6, src->local_ip6, sizeof(src->local_ip6)); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:390: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. memcpy(&options->servers[j++], data/pycares-3.1.1/deps/c-ares/src/ares_init.c:692: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 enumKeyName[256]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:997: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 text[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1363: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 keyName[256]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1546: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 propname[PROP_NAME_MAX]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1547: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 propvalue[PROP_VALUE_MAX]=""; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1615: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 str[INET6_ADDRSTRLEN]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1684:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(resolvconf_path, "r"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1726:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/etc/nsswitch.conf", "r"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1756:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/etc/host.conf", "r"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:1787:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/etc/svc.conf", "r"); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2025: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 lookups[3], *l; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2059:52: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static int ares_ipv6_subnet_matches(const unsigned char netbase[16], data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2060:46: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 netmask, data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2061:52: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char ipaddr[16]) data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2063:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mask[16] = { 0 }; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2087:56: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static int ares_ipv6_server_blacklisted(const unsigned char ipaddr[16]) data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2091:20: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 unsigned char netbase[16]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2178:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&newserv[*nservers].addr.addrV4, &host.addrV4, data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2181:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&newserv[*nservers].addr.addrV6, &host.addrV6, data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2203: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 ipbuf[16], ipbufpfx[32]; data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2208:7: [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(ipbuf, str, q-str); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2216: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. memcpy(ipbufpfx, str, q-str); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2255: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. memcpy(ipbuf, str, q-str); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2481: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). FILE *f = fopen(RANDOM_FILE, "rb"); data/pycares-3.1.1/deps/c-ares/src/ares_options.c:182:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&channel->servers[i].addr.addrV4, &srvr->addrV4, data/pycares-3.1.1/deps/c-ares/src/ares_options.c:185:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&channel->servers[i].addr.addrV6, &srvr->addrV6, data/pycares-3.1.1/deps/c-ares/src/ares_options.c:234:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&channel->servers[i].addr.addrV4, &srvr->addrV4, data/pycares-3.1.1/deps/c-ares/src/ares_options.c:237:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&channel->servers[i].addr.addrV6, &srvr->addrV6, data/pycares-3.1.1/deps/c-ares/src/ares_options.c:348:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&s->addr, &in6, sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_options.c:358:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&s->addr, &in4, sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_parse_a_reply.c:158: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. memcpy(&addrs[naddrs], aptr, sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_parse_a_reply.c:169: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. memcpy(&at->ipaddr, aptr, sizeof(struct in_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_parse_aaaa_reply.c:158: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. memcpy(&addrs[naddrs], aptr, sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_parse_aaaa_reply.c:169: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. memcpy(&at->ip6addr, aptr, sizeof(struct ares_in6_addr)); data/pycares-3.1.1/deps/c-ares/src/ares_parse_ptr_reply.c:213:23: [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(hostent->h_addr_list[0], addr, addrlen); data/pycares-3.1.1/deps/c-ares/src/ares_parse_txt_reply.c:166: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. memcpy ((char *) txt_curr->txt, strptr, substr_len); data/pycares-3.1.1/deps/c-ares/src/ares_private.h:162:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tcp_lenbuf[2]; data/pycares-3.1.1/deps/c-ares/src/ares_private.h:256:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char state[256]; data/pycares-3.1.1/deps/c-ares/src/ares_private.h:282: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 local_dev_name[32]; data/pycares-3.1.1/deps/c-ares/src/ares_private.h:284:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char local_ip6[16]; data/pycares-3.1.1/deps/c-ares/src/ares_process.c:466:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[MAXENDSSZ + 1]; data/pycares-3.1.1/deps/c-ares/src/ares_process.c:1032:7: [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(&local.sa6.sin6_addr, channel->local_ip6, data/pycares-3.1.1/deps/c-ares/src/ares_process.c:1089:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&saddr.sa4.sin_addr, &server->addr.addrV4, data/pycares-3.1.1/deps/c-ares/src/ares_process.c:1102:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&saddr.sa6.sin6_addr, &server->addr.addrV6, data/pycares-3.1.1/deps/c-ares/src/ares_process.c:1202:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&saddr.sa4.sin_addr, &server->addr.addrV4, data/pycares-3.1.1/deps/c-ares/src/ares_process.c:1215:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&saddr.sa6.sin6_addr, &server->addr.addrV6, data/pycares-3.1.1/deps/c-ares/src/ares_process.c:1415:20: [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(sendreq->data_storage, sendreq->data, sendreq->len); data/pycares-3.1.1/deps/c-ares/src/ares_rules.h:90: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. typedef char data/pycares-3.1.1/deps/c-ares/src/ares_rules.h:100:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef char data/pycares-3.1.1/deps/c-ares/src/ares_search.c:224: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, name, nlen); data/pycares-3.1.1/deps/c-ares/src/ares_search.c:226: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 + nlen + 1, domain, dlen); data/pycares-3.1.1/deps/c-ares/src/ares_search.c:261: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). fp = fopen(hostaliases, "r"); data/pycares-3.1.1/deps/c-ares/src/ares_search.c:281:27: [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, p, q - p); data/pycares-3.1.1/deps/c-ares/src/ares_send.c:89: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(query->tcpbuf + 2, qbuf, qlen); data/pycares-3.1.1/deps/c-ares/src/ares_strdup.c:41:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s2, s1, sz * sizeof(char)); data/pycares-3.1.1/deps/c-ares/src/ares_writev.c:67: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 (bp, iov[i].iov_base, iov[i].iov_len); data/pycares-3.1.1/deps/c-ares/src/bitncmp.c:46: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. lb = ((const unsigned char *)l)[b]; data/pycares-3.1.1/deps/c-ares/src/bitncmp.c:47: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. rb = ((const unsigned char *)r)[b]; data/pycares-3.1.1/deps/c-ares/src/inet_net_pton.c:274:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; data/pycares-3.1.1/deps/c-ares/src/inet_net_pton.c:377: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(dst, tmp, bytes); data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:91: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 tmp[sizeof("255.255.255.255")]; data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:117: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 tmp[sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")]; data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:180:11: [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. tp += sprintf(tp, "%x", words[i]); data/pycares-3.1.1/deps/c-ares/src/ares__read_line.c:51: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). len = offset + strlen(*buf + offset); data/pycares-3.1.1/deps/c-ares/src/ares_android.c:333:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dns_list[i], ch_server_address, 64); data/pycares-3.1.1/deps/c-ares/src/ares_create_query.c:109: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(name) + 2 + HFIXEDSZ + QFIXEDSZ + data/pycares-3.1.1/deps/c-ares/src/ares_expand_string.c:61:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)q, (char *)encoded, elen.uns); data/pycares-3.1.1/deps/c-ares/src/ares_gethostbyaddr.c:287: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). sprintf(name+strlen(name), data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:339: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). name_len = strlen(name); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:406: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). bufl = strlen(buf); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:408: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(bufl + strlen(tmpbuf) < buflen) data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:419: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 s1_len = strlen(s1), s2_len = strlen(s2); data/pycares-3.1.1/deps/c-ares/src/ares_getnameinfo.c:419:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t s1_len = strlen(s1), s2_len = strlen(s2); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:127: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). if((endptr != env) && (endptr == env + strlen(env)) && (num > 0)) data/pycares-3.1.1/deps/c-ares/src/ares_init.c:300:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((*dest)->local_dev_name, src->local_dev_name, data/pycares-3.1.1/deps/c-ares/src/ares_init.c:859: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). newsize = len + (*dst ? (strlen(*dst) + 2) : 1); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:866: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(*dst) != 0) data/pycares-3.1.1/deps/c-ares/src/ares_init.c:867:5: [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(*dst, ","); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:868:3: [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. strncat(*dst, src, len); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:878:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). commanjoin(dst, src, strlen(src)); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2337: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 len = strlen(opt); data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2381:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((len = strlen(opt)) == 0) data/pycares-3.1.1/deps/c-ares/src/ares_init.c:2545:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(channel->local_dev_name, local_dev_name, data/pycares-3.1.1/deps/c-ares/src/ares_options.c:267: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). i = strlen(_csv); data/pycares-3.1.1/deps/c-ares/src/ares_parse_ns_reply.c:126:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nameservers[nameservers_num] = ares_malloc(strlen(rr_data)+1); data/pycares-3.1.1/deps/c-ares/src/ares_parse_ptr_reply.c:136: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). rr_data_len = strlen(rr_data)+1; data/pycares-3.1.1/deps/c-ares/src/ares_parse_ptr_reply.c:144:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(aliases[aliascnt], rr_data, rr_data_len); data/pycares-3.1.1/deps/c-ares/src/ares_platform.c:11003: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). switch (strlen(proto)) { data/pycares-3.1.1/deps/c-ares/src/ares_search.c:218:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nlen = strlen(name); data/pycares-3.1.1/deps/c-ares/src/ares_search.c:219:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dlen = strlen(domain); data/pycares-3.1.1/deps/c-ares/src/ares_search.c:237: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 len = strlen(name); data/pycares-3.1.1/deps/c-ares/src/ares_strdup.c:35: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). sz = strlen(s1); data/pycares-3.1.1/deps/c-ares/src/ares_strsplit.c:26:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str); data/pycares-3.1.1/deps/c-ares/src/ares_strsplit.c:90: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). in_len = strlen(in); data/pycares-3.1.1/deps/c-ares/src/ares_strsplit.c:91: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). num_delims = strlen(delms); data/pycares-3.1.1/deps/c-ares/src/inet_ntop.c:177: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). tp += strlen(tp); data/pycares-3.1.1/deps/c-ares/src/setup_once.h:134:36: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define sread(x,y,z) (ares_ssize_t)read((RECV_TYPE_ARG1)(x), \ ANALYSIS SUMMARY: Hits = 153 Lines analyzed = 31082 in approximately 1.12 seconds (27867 lines/second) Physical Source Lines of Code (SLOC) = 22763 Hits@level = [0] 26 [1] 34 [2] 104 [3] 7 [4] 8 [5] 0 Hits@level+ = [0+] 179 [1+] 153 [2+] 119 [3+] 15 [4+] 8 [5+] 0 Hits/KSLOC@level+ = [0+] 7.86364 [1+] 6.72143 [2+] 5.22778 [3+] 0.658964 [4+] 0.351448 [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.