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-bigmemory-4.5.36/src/util.cpp Examining data/r-cran-bigmemory-4.5.36/src/bigmemory.cpp Examining data/r-cran-bigmemory-4.5.36/src/RcppExports.cpp Examining data/r-cran-bigmemory-4.5.36/src/BigMatrix.cpp Examining data/r-cran-bigmemory-4.5.36/src/deepcopy.cpp Examining data/r-cran-bigmemory-4.5.36/src/SharedCounter.cpp Examining data/r-cran-bigmemory-4.5.36/inst/include/bigmemory/BigMatrix.h Examining data/r-cran-bigmemory-4.5.36/inst/include/bigmemory/isna.hpp Examining data/r-cran-bigmemory-4.5.36/inst/include/bigmemory/MatrixAccessor.hpp Examining data/r-cran-bigmemory-4.5.36/inst/include/bigmemory/util.h Examining data/r-cran-bigmemory-4.5.36/inst/include/bigmemory/bigmemoryDefines.h Examining data/r-cran-bigmemory-4.5.36/inst/include/bigmemory/SharedCounter.h FINAL RESULTS: data/r-cran-bigmemory-4.5.36/src/BigMatrix.cpp:824:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen( columnName.c_str(), "wb"); data/r-cran-bigmemory-4.5.36/src/BigMatrix.cpp:850:15: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!fbuf.open( columnName.c_str(), std::ios_base::in | std::ios_base::out | data/r-cran-bigmemory-4.5.36/src/BigMatrix.cpp:897:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen( fullFileName.c_str(), "wb"); data/r-cran-bigmemory-4.5.36/src/BigMatrix.cpp:912:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!fbuf.open( (filePath+fileName).c_str(), data/r-cran-bigmemory-4.5.36/src/bigmemory.cpp:768:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file.open(CHAR(Rf_asChar(fileName))); data/r-cran-bigmemory-4.5.36/src/bigmemory.cpp:901:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *FP = fopen(CHAR(Rf_asChar(fileName)), "w"); data/r-cran-bigmemory-4.5.36/src/bigmemory.cpp:2338:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FP = fopen(CHAR(Rf_asChar(fileName)), "r"); data/r-cran-bigmemory-4.5.36/src/bigmemory.cpp:2346:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). readChar = fgetc(FP); ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 6561 in approximately 0.15 seconds (44417 lines/second) Physical Source Lines of Code (SLOC) = 5863 Hits@level = [0] 3 [1] 1 [2] 7 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 11 [1+] 8 [2+] 7 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.87617 [1+] 1.36449 [2+] 1.19393 [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.