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-gdtools-0.2.2/src/CairoContext.cpp
Examining data/r-cran-gdtools-0.2.2/src/gdtools.cpp
Examining data/r-cran-gdtools-0.2.2/src/tests/sysdeps.c
Examining data/r-cran-gdtools-0.2.2/src/font_metrics.cpp
Examining data/r-cran-gdtools-0.2.2/src/raster_to_base64.cpp
Examining data/r-cran-gdtools-0.2.2/src/versions.cpp
Examining data/r-cran-gdtools-0.2.2/src/RcppExports.cpp
Examining data/r-cran-gdtools-0.2.2/inst/include/gdtools_RcppExports.h
Examining data/r-cran-gdtools-0.2.2/inst/include/gdtools.h
Examining data/r-cran-gdtools-0.2.2/inst/include/gdtools_types.cpp
Examining data/r-cran-gdtools-0.2.2/inst/include/gdtools_types.h

FINAL RESULTS:

data/r-cran-gdtools-0.2.2/src/CairoContext.cpp:105:5:  [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 props[20];
data/r-cran-gdtools-0.2.2/src/raster_to_base64.cpp:32:12:  [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.
  unsigned char char_array_3[3];
data/r-cran-gdtools-0.2.2/src/raster_to_base64.cpp:33:12:  [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.
  unsigned char char_array_4[4];
data/r-cran-gdtools-0.2.2/src/raster_to_base64.cpp:220:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  ifs.read(&result[0], pos);

ANALYSIS SUMMARY:

Hits = 4
Lines analyzed = 1339 in approximately 0.07 seconds (19282 lines/second)
Physical Source Lines of Code (SLOC) = 1135
Hits@level = [0]   1 [1]   1 [2]   3 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]   5 [1+]   4 [2+]   3 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.40529 [1+] 3.52423 [2+] 2.64317 [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.