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/ivykis-0.42.4/contrib/iv_getaddrinfo/iv_getaddrinfo.c
Examining data/ivykis-0.42.4/contrib/iv_getaddrinfo/iv_getaddrinfo.h
Examining data/ivykis-0.42.4/contrib/iv_getaddrinfo/test.c
Examining data/ivykis-0.42.4/contrib/kojines/kojines.c
Examining data/ivykis-0.42.4/contrib/kojines/kojines.h
Examining data/ivykis-0.42.4/contrib/kojines/main.c
Examining data/ivykis-0.42.4/src/eventfd-linux.h
Examining data/ivykis-0.42.4/src/eventfd-stub.h
Examining data/ivykis-0.42.4/src/include/iv_avl.h
Examining data/ivykis-0.42.4/src/include/iv_event.h
Examining data/ivykis-0.42.4/src/include/iv_event_raw.h
Examining data/ivykis-0.42.4/src/include/iv_fd_pump.h
Examining data/ivykis-0.42.4/src/include/iv_inotify.h
Examining data/ivykis-0.42.4/src/include/iv_list.h
Examining data/ivykis-0.42.4/src/include/iv_popen.h
Examining data/ivykis-0.42.4/src/include/iv_signal.h
Examining data/ivykis-0.42.4/src/include/iv_thread.h
Examining data/ivykis-0.42.4/src/include/iv_tls.h
Examining data/ivykis-0.42.4/src/include/iv_wait.h
Examining data/ivykis-0.42.4/src/include/iv_work.h
Examining data/ivykis-0.42.4/src/iv_avl.c
Examining data/ivykis-0.42.4/src/iv_event.c
Examining data/ivykis-0.42.4/src/iv_event_private.h
Examining data/ivykis-0.42.4/src/iv_event_raw_posix.c
Examining data/ivykis-0.42.4/src/iv_event_raw_win32.c
Examining data/ivykis-0.42.4/src/iv_fatal.c
Examining data/ivykis-0.42.4/src/iv_fd.c
Examining data/ivykis-0.42.4/src/iv_fd_dev_poll.c
Examining data/ivykis-0.42.4/src/iv_fd_epoll.c
Examining data/ivykis-0.42.4/src/iv_fd_kqueue.c
Examining data/ivykis-0.42.4/src/iv_fd_poll.c
Examining data/ivykis-0.42.4/src/iv_fd_port.c
Examining data/ivykis-0.42.4/src/iv_fd_pump.c
Examining data/ivykis-0.42.4/src/iv_handle.c
Examining data/ivykis-0.42.4/src/iv_inotify.c
Examining data/ivykis-0.42.4/src/iv_main_posix.c
Examining data/ivykis-0.42.4/src/iv_main_win32.c
Examining data/ivykis-0.42.4/src/iv_popen.c
Examining data/ivykis-0.42.4/src/iv_private.h
Examining data/ivykis-0.42.4/src/iv_private_posix.h
Examining data/ivykis-0.42.4/src/iv_private_win32.h
Examining data/ivykis-0.42.4/src/iv_signal.c
Examining data/ivykis-0.42.4/src/iv_task.c
Examining data/ivykis-0.42.4/src/iv_thread_posix.c
Examining data/ivykis-0.42.4/src/iv_thread_win32.c
Examining data/ivykis-0.42.4/src/iv_tid_posix.c
Examining data/ivykis-0.42.4/src/iv_tid_win32.c
Examining data/ivykis-0.42.4/src/iv_time_posix.c
Examining data/ivykis-0.42.4/src/iv_time_win32.c
Examining data/ivykis-0.42.4/src/iv_timer.c
Examining data/ivykis-0.42.4/src/iv_tls.c
Examining data/ivykis-0.42.4/src/iv_wait.c
Examining data/ivykis-0.42.4/src/iv_work.c
Examining data/ivykis-0.42.4/src/mutex.h
Examining data/ivykis-0.42.4/src/pthr.h
Examining data/ivykis-0.42.4/src/spinlock.h
Examining data/ivykis-0.42.4/test.mt/handle.c
Examining data/ivykis-0.42.4/test.mt/iv_event_bench.c
Examining data/ivykis-0.42.4/test.mt/iv_event_test.c
Examining data/ivykis-0.42.4/test.mt/iv_signal_thread_test.c
Examining data/ivykis-0.42.4/test.mt/iv_thread_test.c
Examining data/ivykis-0.42.4/test.mt/iv_wait_test.c
Examining data/ivykis-0.42.4/test.mt/iv_work_test.c
Examining data/ivykis-0.42.4/test.mt/server.c
Examining data/ivykis-0.42.4/test/avl.c
Examining data/ivykis-0.42.4/test/client.c
Examining data/ivykis-0.42.4/test/connectfail.c
Examining data/ivykis-0.42.4/test/connectreset.c
Examining data/ivykis-0.42.4/test/event_unregister_bug.c
Examining data/ivykis-0.42.4/test/iv_event_raw_bench.c
Examining data/ivykis-0.42.4/test/iv_event_raw_test.c
Examining data/ivykis-0.42.4/test/iv_fd_pump_discard.c
Examining data/ivykis-0.42.4/test/iv_fd_pump_echo.c
Examining data/ivykis-0.42.4/test/iv_inotify_test.c
Examining data/ivykis-0.42.4/test/iv_popen_test.c
Examining data/ivykis-0.42.4/test/iv_signal_bench.c
Examining data/ivykis-0.42.4/test/iv_signal_child_test.c
Examining data/ivykis-0.42.4/test/iv_signal_test.c
Examining data/ivykis-0.42.4/test/null.c
Examining data/ivykis-0.42.4/test/struct_sizes.c
Examining data/ivykis-0.42.4/test/timer.c
Examining data/ivykis-0.42.4/test/timer_fairness.c
Examining data/ivykis-0.42.4/test/timer_fairness_bug.c
Examining data/ivykis-0.42.4/test/timer_order.c
Examining data/ivykis-0.42.4/test/timer_past.c
Examining data/ivykis-0.42.4/test/timer_zero.c

FINAL RESULTS:

data/ivykis-0.42.4/src/iv_fatal.c:47:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(msg, sizeof(msg), fmt, ap);
data/ivykis-0.42.4/src/iv_popen.c:93:2:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execvp(info->this->file, info->this->argv);
data/ivykis-0.42.4/test/avl.c:66:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(msg, sizeof(msg), fmt, ap);
data/ivykis-0.42.4/src/iv_fd.c:101:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	exclude = getenv("IV_EXCLUDE_POLL_METHOD");
data/ivykis-0.42.4/src/iv_handle.c:36:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/iv_handle.c:81:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/iv_handle.c:87:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
		EnterCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/iv_handle.c:138:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/iv_handle.c:153:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
		EnterCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/iv_handle.c:220:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
		EnterCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/iv_handle.c:256:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&st->active_handle_list_lock);
data/ivykis-0.42.4/src/mutex.h:66:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(mutex);
data/ivykis-0.42.4/src/mutex.h:78:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(mutex);
data/ivykis-0.42.4/test/avl.c:172:2:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srand(time(NULL) ^ getpid());
data/ivykis-0.42.4/contrib/iv_getaddrinfo/test.c:139:4:  [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 name[64];
data/ivykis-0.42.4/contrib/iv_getaddrinfo/test.c:147:4:  [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 name[64];
data/ivykis-0.42.4/src/iv_event_raw_posix.c:41: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 buf[1024];
data/ivykis-0.42.4/src/iv_fatal.c:44: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 msg[1024];
data/ivykis-0.42.4/src/iv_fd.c:67: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 method_name[64];
data/ivykis-0.42.4/src/iv_fd_dev_poll.c:52:12:  [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).
	poll_fd = open("/dev/poll", O_RDWR | O_CLOEXEC);
data/ivykis-0.42.4/src/iv_fd_dev_poll.c:56:12:  [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).
	poll_fd = open("/dev/poll", O_RDWR);
data/ivykis-0.42.4/src/iv_fd_pump.c:122: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	buf[0];
data/ivykis-0.42.4/src/iv_popen.c:73:12:  [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).
	devnull = open("/dev/null", O_RDWR);
data/ivykis-0.42.4/src/iv_work.c:288: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 name[512];
data/ivykis-0.42.4/test.mt/server.c:52: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 buf[128];
data/ivykis-0.42.4/test/avl.c:63: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 msg[1024];
data/ivykis-0.42.4/test/iv_fd_pump_discard.c:128:12:  [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).
	devnull = open("/dev/null", O_WRONLY);
data/ivykis-0.42.4/test/iv_popen_test.c:30: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 *argv[3];
data/ivykis-0.42.4/test/iv_popen_test.c:49: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 buf[1024];
data/ivykis-0.42.4/test/iv_signal_child_test.c:37: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 *argv[3];
data/ivykis-0.42.4/contrib/kojines/kojines.c:145:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(k->server_fd.fd, k->buf + k->buf_length, space);
data/ivykis-0.42.4/contrib/kojines/kojines.c:197:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(k->server_fd.fd, k->buf + k->buf_length, space);
data/ivykis-0.42.4/src/iv_event_raw_posix.c:47:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(this->event_rfd.fd, buf, toread);
data/ivykis-0.42.4/src/iv_fd.c:70:10:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		while (sscanf(exclude, "%63s%n", method_name, &len) > 0) {
data/ivykis-0.42.4/src/iv_fd_epoll.c:457:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = read(st->u.epoll.timer_fd, &cnt, sizeof(cnt));
data/ivykis-0.42.4/src/iv_fd_pump.c:294:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ret = read(ip->from_fd, buf->u.buf + ip->bytes,
data/ivykis-0.42.4/src/iv_inotify.c:63:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		ret = read(this->fd.fd, event_queue, sizeof(event_queue));
data/ivykis-0.42.4/src/spinlock.h:50:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(lock->fd[0], &c, 1);
data/ivykis-0.42.4/test/iv_popen_test.c:52:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(req->popen_fd.fd, buf, sizeof(buf));

ANALYSIS SUMMARY:

Hits = 39
Lines analyzed = 12303 in approximately 0.36 seconds (34579 lines/second)
Physical Source Lines of Code (SLOC) = 8098
Hits@level = [0] 143 [1]   9 [2]  16 [3]  11 [4]   3 [5]   0
Hits@level+ = [0+] 182 [1+]  39 [2+]  30 [3+]  14 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 22.4747 [1+] 4.816 [2+] 3.70462 [3+] 1.72882 [4+] 0.370462 [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.