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-wk-0.3.3/src/format.cpp
Examining data/r-cran-wk-0.3.3/src/problems.cpp
Examining data/r-cran-wk-0.3.3/src/translate.cpp
Examining data/r-cran-wk-0.3.3/src/RcppExports.cpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/wkt-streamer.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/geometry-formatter.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/wkb-reader.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/geometry-handler.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/geometry-debug-handler.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/io-string.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/writer.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/rcpp-coord-reader.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/geometry.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/parse-exception.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/reader.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/io.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/coord.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/wkt-reader.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/rcpp-translate.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/rcpp-sexp-reader.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/wkt-writer.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/io-bytes.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/error-formatter.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/rcpp-sexp-writer.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/filter.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/geometry-meta.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/rcpp-io.hpp
Examining data/r-cran-wk-0.3.3/inst/include/wk/wkb-writer.hpp

FINAL RESULTS:

data/r-cran-wk-0.3.3/inst/include/wk/io-bytes.hpp:16:14:  [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 u8[sizeof(T)];
data/r-cran-wk-0.3.3/inst/include/wk/rcpp-io.hpp:143: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(&dst, &(this->data[this->offset]), sizeof(T));
data/r-cran-wk-0.3.3/inst/include/wk/rcpp-io.hpp:183:7:  [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(&(item[0]), &(this->buffer[0]), this->offset);
data/r-cran-wk-0.3.3/inst/include/wk/rcpp-io.hpp:204: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(&newBuffer[0], &(this->buffer[0]), this->offset);
data/r-cran-wk-0.3.3/inst/include/wk/rcpp-io.hpp:228: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(&(this->buffer[this->offset]), &value, sizeof(T));
data/r-cran-wk-0.3.3/inst/include/wk/wkt-streamer.hpp:35:20:  [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).
  str(str), length(strlen(str)), offset(0), whitespace(whitespace), sep(sep) {}
data/r-cran-wk-0.3.3/inst/include/wk/wkt-streamer.hpp:197:10:  [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(chars) > 0) && this->finished()) {
data/r-cran-wk-0.3.3/inst/include/wk/wkt-streamer.hpp:300:21:  [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).
    size_t nChars = strlen(chars);

ANALYSIS SUMMARY:

Hits = 8
Lines analyzed = 3990 in approximately 0.11 seconds (37512 lines/second)
Physical Source Lines of Code (SLOC) = 3162
Hits@level = [0]   0 [1]   3 [2]   5 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]   8 [1+]   8 [2+]   5 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 2.53004 [1+] 2.53004 [2+] 1.58128 [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.