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-kyotocabinet-1.33/kyotocabinet.cc

FINAL RESULTS:

data/ruby-kyotocabinet-1.33/kyotocabinet.cc:967:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(xname, "X%s", name);
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:639:7:  [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 kbuf[kc::NUMBUFSIZ];
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:640:26:  [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.
      size_t ksiz = std::sprintf(kbuf, "%d", (int)FIX2INT(vobj));
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:649: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 kbuf[kc::NUMBUFSIZ*2];
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:650:8:  [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.
  std::sprintf(kbuf, "#<Object:0x%llx>", (long long)rb_obj_id(vobj));
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:849:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  int64_t num = kc::atoi(RSTRING_PTR(vstr));
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:966: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 xname[kc::NUMBUFSIZ];
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:980:25:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    uint32_t code = kc::atoi(expr);
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:2148:20:  [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).
        rv_ = db_->open(path_, mode_);
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:2159:14:  [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).
    rv = db->open(path, mode);
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:4032: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(kbuf_, kbuf, ksiz);
data/ruby-kyotocabinet-1.33/kyotocabinet.cc:4036: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(vbuf_, vbuf, vsiz);

ANALYSIS SUMMARY:

Hits = 12
Lines analyzed = 4172 in approximately 0.12 seconds (36251 lines/second)
Physical Source Lines of Code (SLOC) = 3501
Hits@level = [0]   0 [1]   0 [2]  11 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  12 [1+]  12 [2+]  12 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 3.42759 [1+] 3.42759 [2+] 3.42759 [3+] 0.285633 [4+] 0.285633 [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.