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-xml2-1.3.2/src/xml2_url.cpp Examining data/r-cran-xml2-1.3.2/src/xml2_node.cpp Examining data/r-cran-xml2-1.3.2/src/xml2_init.cpp Examining data/r-cran-xml2-1.3.2/src/xml2_output.cpp Examining data/r-cran-xml2-1.3.2/src/xml2_doc.cpp Examining data/r-cran-xml2-1.3.2/src/init.c Examining data/r-cran-xml2-1.3.2/src/xml2_xpath.cpp Examining data/r-cran-xml2-1.3.2/src/connection.h Examining data/r-cran-xml2-1.3.2/src/xml2_utils.h Examining data/r-cran-xml2-1.3.2/src/connection.cpp Examining data/r-cran-xml2-1.3.2/src/xml2_namespace.cpp Examining data/r-cran-xml2-1.3.2/src/xml2_schema.cpp Examining data/r-cran-xml2-1.3.2/inst/include/xml2_types.h FINAL RESULTS: data/r-cran-xml2-1.3.2/src/xml2_init.cpp:36:3: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buffer, BUFSIZ, fmt, arg); data/r-cran-xml2-1.3.2/src/connection.h:18: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(buf, RAW(res), size); data/r-cran-xml2-1.3.2/src/connection.h:28: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(RAW(payload), buf, n); data/r-cran-xml2-1.3.2/src/xml2_init.cpp:30: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 buffer[BUFSIZ]; data/r-cran-xml2-1.3.2/src/xml2_node.cpp:65:15: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. return std::equal( ANALYSIS SUMMARY: Hits = 5 Lines analyzed = 2272 in approximately 0.06 seconds (35537 lines/second) Physical Source Lines of Code (SLOC) = 1699 Hits@level = [0] 0 [1] 1 [2] 3 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 5 [1+] 5 [2+] 4 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 2.94291 [1+] 2.94291 [2+] 2.35433 [3+] 0.588582 [4+] 0.588582 [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.