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-kgio-2.11.2/ext/kgio/kgio.h
Examining data/ruby-kgio-2.11.2/ext/kgio/my_fileno.h
Examining data/ruby-kgio-2.11.2/ext/kgio/ancient_ruby.h
Examining data/ruby-kgio-2.11.2/ext/kgio/writev.c
Examining data/ruby-kgio-2.11.2/ext/kgio/accept.c
Examining data/ruby-kgio-2.11.2/ext/kgio/blocking_io_region.h
Examining data/ruby-kgio-2.11.2/ext/kgio/write.c
Examining data/ruby-kgio-2.11.2/ext/kgio/tryopen.c
Examining data/ruby-kgio-2.11.2/ext/kgio/wait.c
Examining data/ruby-kgio-2.11.2/ext/kgio/missing_accept4.h
Examining data/ruby-kgio-2.11.2/ext/kgio/set_file_path.h
Examining data/ruby-kgio-2.11.2/ext/kgio/autopush.c
Examining data/ruby-kgio-2.11.2/ext/kgio/read.c
Examining data/ruby-kgio-2.11.2/ext/kgio/nonblock.h
Examining data/ruby-kgio-2.11.2/ext/kgio/sock_for_fd.h
Examining data/ruby-kgio-2.11.2/ext/kgio/broken_system_compat.h
Examining data/ruby-kgio-2.11.2/ext/kgio/connect.c
Examining data/ruby-kgio-2.11.2/ext/kgio/kgio_ext.c
Examining data/ruby-kgio-2.11.2/ext/kgio/poll.c

FINAL RESULTS:

data/ruby-kgio-2.11.2/ext/kgio/connect.c:98:2:  [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 ipport[6];
data/ruby-kgio-2.11.2/ext/kgio/connect.c:123: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(addr, res->ai_addr, res->ai_addrlen);
data/ruby-kgio-2.11.2/ext/kgio/connect.c:256: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(addr.sun_path, RSTRING_PTR(path), len);
data/ruby-kgio-2.11.2/ext/kgio/tryopen.c:33:34:  [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).
#  define rb_cloexec_open(p,f,m) open((p),(f),(m))
data/ruby-kgio-2.11.2/ext/kgio/writev.c:87: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(curbuf, curvec->iov_base, curvec->iov_len);
data/ruby-kgio-2.11.2/ext/kgio/accept.c:159: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(host, strlen(host_ptr));
data/ruby-kgio-2.11.2/ext/kgio/read.c:93:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		n = (long)read(a.fd, a.ptr, a.len);

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 3229 in approximately 0.10 seconds (32338 lines/second)
Physical Source Lines of Code (SLOC) = 2017
Hits@level = [0]   4 [1]   2 [2]   5 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  11 [1+]   7 [2+]   5 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 5.45364 [1+] 3.4705 [2+] 2.47893 [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.