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/r-cran-farver-2.0.3/src/farver.cpp Examining data/r-cran-farver-2.0.3/src/init.cpp Examining data/r-cran-farver-2.0.3/src/encode.h Examining data/r-cran-farver-2.0.3/src/ColorSpace.cpp Examining data/r-cran-farver-2.0.3/src/Conversion.cpp Examining data/r-cran-farver-2.0.3/src/farver.h Examining data/r-cran-farver-2.0.3/src/Conversion.h Examining data/r-cran-farver-2.0.3/src/Utils.h Examining data/r-cran-farver-2.0.3/src/encode.cpp Examining data/r-cran-farver-2.0.3/src/ColorSpace.h Examining data/r-cran-farver-2.0.3/src/Comparison.cpp Examining data/r-cran-farver-2.0.3/src/Comparison.h FINAL RESULTS: data/r-cran-farver-2.0.3/src/encode.cpp:598: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(buffera, col); data/r-cran-farver-2.0.3/src/encode.cpp:609: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(buffera, buffer); data/r-cran-farver-2.0.3/src/encode.cpp:695: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(buffera, col); data/r-cran-farver-2.0.3/src/encode.cpp:794: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(buffera, col); data/r-cran-farver-2.0.3/src/encode.cpp:36: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). int col_num = atoi(col); data/r-cran-farver-2.0.3/src/encode.cpp:382: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:471: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:591: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:691: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:790: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:795: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(buffera) == 7) { data/r-cran-farver-2.0.3/src/encode.cpp:894: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:948: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). nchar = strlen(col); data/r-cran-farver-2.0.3/src/encode.cpp:1015: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). nchar = strlen(col); ANALYSIS SUMMARY: Hits = 14 Lines analyzed = 3534 in approximately 0.10 seconds (34587 lines/second) Physical Source Lines of Code (SLOC) = 3110 Hits@level = [0] 0 [1] 9 [2] 1 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 14 [1+] 14 [2+] 5 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 4.50161 [1+] 4.50161 [2+] 1.60772 [3+] 1.28617 [4+] 1.28617 [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.