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-vdiffr-0.3.3+dfsg/src/utils.h
Examining data/r-cran-vdiffr-0.3.3+dfsg/src/algo-it.h
Examining data/r-cran-vdiffr-0.3.3+dfsg/src/compare.cpp
Examining data/r-cran-vdiffr-0.3.3+dfsg/src/SvgStream.h
Examining data/r-cran-vdiffr-0.3.3+dfsg/src/utils.cpp
Examining data/r-cran-vdiffr-0.3.3+dfsg/src/devSVG.cpp
Examining data/r-cran-vdiffr-0.3.3+dfsg/src/RcppExports.cpp

FINAL RESULTS:

data/r-cran-vdiffr-0.3.3+dfsg/src/SvgStream.h:46: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).
    stream_.open(R_ExpandFileName(path.c_str()));
data/r-cran-vdiffr-0.3.3+dfsg/src/devSVG.cpp:304: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 str[16];
data/r-cran-vdiffr-0.3.3+dfsg/src/compare.cpp:35:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (!file1.read(buffer1.data(), size1) ||
data/r-cran-vdiffr-0.3.3+dfsg/src/compare.cpp:36:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      !file2.read(buffer2.data(), size2))

ANALYSIS SUMMARY:

Hits = 4
Lines analyzed = 1245 in approximately 0.05 seconds (24005 lines/second)
Physical Source Lines of Code (SLOC) = 936
Hits@level = [0]   0 [1]   2 [2]   2 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]   4 [1+]   4 [2+]   2 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.2735 [1+] 4.2735 [2+] 2.13675 [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.