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/pagodacf-0.10/cf_common_p.c Examining data/pagodacf-0.10/cf_ip4_addr_p.c Examining data/pagodacf-0.10/cf_ip4_addr_p.h Examining data/pagodacf-0.10/cf_ip4_proto_p.c Examining data/pagodacf-0.10/cf_ip4_proto_p.h Examining data/pagodacf-0.10/cf_ip6_addr_p.c Examining data/pagodacf-0.10/cf_ip6_addr_p.h Examining data/pagodacf-0.10/cf_ip6_proto_p.c Examining data/pagodacf-0.10/cf_ip6_proto_p.h Examining data/pagodacf-0.10/cf_ip_common_p.c Examining data/pagodacf-0.10/cf_ip_common_p.h Examining data/pagodacf-0.10/cf_nameinfo_p.c Examining data/pagodacf-0.10/cf_nameinfo_p.h Examining data/pagodacf-0.10/cf_netif_p.c Examining data/pagodacf-0.10/cf_netif_p.h Examining data/pagodacf-0.10/cf_sock_dgram_p.c Examining data/pagodacf-0.10/cf_sock_dgram_p.h Examining data/pagodacf-0.10/cf_sock_stream_p.c Examining data/pagodacf-0.10/cf_sock_stream_p.h Examining data/pagodacf-0.10/cf_socket_p.c Examining data/pagodacf-0.10/cf_socket_p.h Examining data/pagodacf-0.10/cf_xxxxx_p.c Examining data/pagodacf-0.10/cf_xxxxx_p.h Examining data/pagodacf-0.10/cf_common_p.h Examining data/pagodacf-0.10/cf_tai64_p.c Examining data/pagodacf-0.10/cf_tai64_p.h Examining data/pagodacf-0.10/cf_tai64n_p.c Examining data/pagodacf-0.10/cf_tai64n_p.h FINAL RESULTS: data/pagodacf-0.10/cf_ip4_proto_p.c:230: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(ifrPtr->ifr_name, String_val(nameVal)); data/pagodacf-0.10/cf_nameinfo_p.c:404:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf data/pagodacf-0.10/cf_socket_p.c:776:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(failStr, "Cf_socket.getsockopt %s not implemented.", data/pagodacf-0.10/cf_socket_p.c:807:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(failStr, "Cf_socket.setsockopt %s not implemented.", data/pagodacf-0.10/cf_ip4_addr_p.c:379: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[INET_ADDRSTRLEN]; data/pagodacf-0.10/cf_ip4_addr_p.c:539: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[INET_ADDRSTRLEN]; data/pagodacf-0.10/cf_ip4_proto_p.c:140: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(&sxPtr->sx_sockaddr_in, saPtr, saLen); data/pagodacf-0.10/cf_ip4_proto_p.c:219: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[IF_NAMESIZE + sizeof(struct sockaddr_storage)]; data/pagodacf-0.10/cf_ip6_addr_p.c:451: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(&groupId.s6_addr[2], &addrPtr->s6_addr[2], 14); data/pagodacf-0.10/cf_ip6_addr_p.c:499: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(&addr.s6_addr[2], &Cf_ip6_addr_val(groupIdVal)->s6_addr[2], 14); data/pagodacf-0.10/cf_ip6_addr_p.c:610: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[INET6_ADDRSTRLEN]; data/pagodacf-0.10/cf_ip6_proto_p.c:150: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(&sxPtr->sx_sockaddr_in6, saPtr, saLen); data/pagodacf-0.10/cf_nameinfo_p.c:149: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(&sxPtr->sx_sockaddr, saPtr, saLen); data/pagodacf-0.10/cf_nameinfo_p.c:331: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 buffer[128]; data/pagodacf-0.10/cf_nameinfo_p.c:332:9: [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(buffer, "unknown error (code=%d)", data/pagodacf-0.10/cf_nameinfo_p.c:403: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 message[128]; data/pagodacf-0.10/cf_netif_p.c:61: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[IF_NAMESIZE]; data/pagodacf-0.10/cf_socket_p.c:100: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(Cf_socket_domain_val(sVal), ptr, sizeof *ptr); data/pagodacf-0.10/cf_socket_p.c:775: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 failStr[80]; data/pagodacf-0.10/cf_socket_p.c:806: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 failStr[80]; data/pagodacf-0.10/cf_tai64_p.c:135: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[8]; data/pagodacf-0.10/cf_tai64_p.c:155: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[8]; data/pagodacf-0.10/cf_tai64n_p.c:99:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[12]; data/pagodacf-0.10/cf_tai64n_p.c:127: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[12]; data/pagodacf-0.10/cf_ip4_proto_p.c:225: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). if (string_length(nameVal) > IF_NAMESIZE || strlen(namePtr) >= IF_NAMESIZE) ANALYSIS SUMMARY: Hits = 25 Lines analyzed = 5759 in approximately 0.20 seconds (29431 lines/second) Physical Source Lines of Code (SLOC) = 3339 Hits@level = [0] 2 [1] 1 [2] 20 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 27 [1+] 25 [2+] 24 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 8.08625 [1+] 7.48727 [2+] 7.18778 [3+] 1.19796 [4+] 1.19796 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.