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-rjson-0.2.20/src/register.c Examining data/r-cran-rjson-0.2.20/src/funcs.h Examining data/r-cran-rjson-0.2.20/src/parser.c Examining data/r-cran-rjson-0.2.20/src/dump.cpp FINAL RESULTS: data/r-cran-rjson-0.2.20/src/parser.c:37:2: [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( buf, 256, format, args ); data/r-cran-rjson-0.2.20/src/parser.c:34: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 buf[ 256 ]; data/r-cran-rjson-0.2.20/src/parser.c:126: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 unicode_buf[ 5 ]; /* to hold 4 digit hex (to prevent scanning a 5th digit accidentally */ data/r-cran-rjson-0.2.20/src/parser.c:332: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( buf + buf_i, s + copy_start, bytes_to_copy ); data/r-cran-rjson-0.2.20/src/parser.c:405: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( buf + buf_i, s + copy_start, bytes_to_copy ); data/r-cran-rjson-0.2.20/src/parser.c:705: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 buf[ MAX_NUMBER_BUF ]; data/r-cran-rjson-0.2.20/src/parser.c:127:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( unicode_buf, s + i + 1, 5 ); data/r-cran-rjson-0.2.20/src/parser.c:242: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( s ) < 4 ) data/r-cran-rjson-0.2.20/src/parser.c:257: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( s ) < 4 ) data/r-cran-rjson-0.2.20/src/parser.c:272: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( s ) < 5 ) data/r-cran-rjson-0.2.20/src/parser.c:761:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( buf, start, len ); ANALYSIS SUMMARY: Hits = 11 Lines analyzed = 1021 in approximately 0.06 seconds (17385 lines/second) Physical Source Lines of Code (SLOC) = 841 Hits@level = [0] 1 [1] 5 [2] 5 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 12 [1+] 11 [2+] 6 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 14.2687 [1+] 13.0797 [2+] 7.13436 [3+] 1.18906 [4+] 1.18906 [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.