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/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c
Examining data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.h
Examining data/ruby-rpatricia-1.0.1/ext/rpatricia/rpatricia.c

FINAL RESULTS:

data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c:100:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(buff + strlen(buff), "/%u", prefix->bitlen);
data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c:140: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(&prefix->add.sin6, dest, addr_size);
data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c:161: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 save[INET6_ADDRSTRLEN];
data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c:180:2:  [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(save, string, len);
data/ruby-rpatricia-1.0.1/ext/rpatricia/rpatricia.c:45:3:  [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(node, orig, sizeof(patricia_node_t));
data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c:100:17:  [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).
	sprintf(buff + strlen(buff), "/%u", prefix->bitlen);
data/ruby-rpatricia-1.0.1/ext/rpatricia/patricia.c:170:11:  [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).
    len = strlen(string);
data/ruby-rpatricia-1.0.1/ext/rpatricia/rpatricia.c:198:27:  [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).
      rb_str_set_len(buf, strlen(cbuf));
data/ruby-rpatricia-1.0.1/ext/rpatricia/rpatricia.c:222:27:  [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).
      rb_str_set_len(buf, strlen(cbuf));
data/ruby-rpatricia-1.0.1/ext/rpatricia/rpatricia.c:254:23:  [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).
  rb_str_set_len(str, strlen(cstr));
data/ruby-rpatricia-1.0.1/ext/rpatricia/rpatricia.c:268:23:  [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).
  rb_str_set_len(str, strlen(cstr));

ANALYSIS SUMMARY:

Hits = 11
Lines analyzed = 1261 in approximately 0.04 seconds (34570 lines/second)
Physical Source Lines of Code (SLOC) = 963
Hits@level = [0]   0 [1]   6 [2]   5 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  11 [1+]  11 [2+]   5 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 11.4226 [1+] 11.4226 [2+] 5.19211 [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.