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-cpp11-0.2.4/tests/testthat/single.cpp Examining data/r-cran-cpp11-0.2.4/tests/testthat/multiple.cpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/environment.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/function.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/data_frame.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/as.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/logicals.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/matrix.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/named_arg.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/raws.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/list.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/external_pointer.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/r_vector.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/sexp.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/R.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/r_string.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/altrep.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/strings.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/attribute_proxy.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/list_of.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/r_bool.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/declarations.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/protect.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/integers.hpp Examining data/r-cran-cpp11-0.2.4/inst/include/cpp11/doubles.hpp FINAL RESULTS: data/r-cran-cpp11-0.2.4/inst/include/cpp11/declarations.hpp:33: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[ERROR_SIZE] = ""; \ data/r-cran-cpp11-0.2.4/inst/include/cpp11/r_vector.hpp:38: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. mutable char str_[64]; data/r-cran-cpp11-0.2.4/inst/include/cpp11/declarations.hpp:41:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, e.what(), ERROR_SIZE - 1); \ data/r-cran-cpp11-0.2.4/inst/include/cpp11/declarations.hpp:44:5: [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. strncpy(buf, "C++ error (unknown cause)", ERROR_SIZE - 1); \ ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 3641 in approximately 0.10 seconds (36705 lines/second) Physical Source Lines of Code (SLOC) = 2820 Hits@level = [0] 1 [1] 2 [2] 2 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 5 [1+] 4 [2+] 2 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.77305 [1+] 1.41844 [2+] 0.70922 [3+] 0 [4+] 0 [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.