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/libnfsidmap-regex-1.2/builtin_nfsidmap_internal.h Examining data/libnfsidmap-regex-1.2/nfsidmap_internal.h Examining data/libnfsidmap-regex-1.2/regex.c FINAL RESULTS: data/libnfsidmap-regex-1.2/regex.c:370: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(dest, prefix); data/libnfsidmap-regex-1.2/regex.c:371: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(dest, name_prefix); data/libnfsidmap-regex-1.2/regex.c:372: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(dest, localname); data/libnfsidmap-regex-1.2/regex.c:373: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(dest, suffix); data/libnfsidmap-regex-1.2/regex.c:86: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[1]; data/libnfsidmap-regex-1.2/regex.c:91: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[1]; data/libnfsidmap-regex-1.2/regex.c:96: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 default_domain[NFS4_MAX_DOMAIN_LEN] = ""; data/libnfsidmap-regex-1.2/regex.c:153:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(localname, name+matches[index].rm_so, namelen); data/libnfsidmap-regex-1.2/regex.c:233:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(localgroup, name+matches[index].rm_so, namelen); data/libnfsidmap-regex-1.2/regex.c:367: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(localname) + strlen(name_prefix) + strlen(prefix) + strlen(suffix) + 1 > len) { data/libnfsidmap-regex-1.2/regex.c:367:26: [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(localname) + strlen(name_prefix) + strlen(prefix) + strlen(suffix) + 1 > len) { data/libnfsidmap-regex-1.2/regex.c:367: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). if (strlen(localname) + strlen(name_prefix) + strlen(prefix) + strlen(suffix) + 1 > len) { data/libnfsidmap-regex-1.2/regex.c:367:65: [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(localname) + strlen(name_prefix) + strlen(prefix) + strlen(suffix) + 1 > len) { data/libnfsidmap-regex-1.2/regex.c:497: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). group_name_prefix_length = strlen(group_name_prefix); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 708 in approximately 0.03 seconds (23742 lines/second) Physical Source Lines of Code (SLOC) = 483 Hits@level = [0] 0 [1] 7 [2] 3 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 14 [1+] 14 [2+] 7 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 28.9855 [1+] 28.9855 [2+] 14.4928 [3+] 8.28157 [4+] 8.28157 [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.