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/libuev-2.3.1/examples/joystick.c
Examining data/libuev-2.3.1/examples/redirect.c
Examining data/libuev-2.3.1/src/timer.c
Examining data/libuev-2.3.1/src/signal.c
Examining data/libuev-2.3.1/src/cron.c
Examining data/libuev-2.3.1/src/private.h
Examining data/libuev-2.3.1/src/event.c
Examining data/libuev-2.3.1/src/io.c
Examining data/libuev-2.3.1/src/uev.c
Examining data/libuev-2.3.1/src/bench.c
Examining data/libuev-2.3.1/src/uev.h
Examining data/libuev-2.3.1/tests/timer.c
Examining data/libuev-2.3.1/tests/signal.c
Examining data/libuev-2.3.1/tests/complete.c
Examining data/libuev-2.3.1/tests/cronrun.c
Examining data/libuev-2.3.1/tests/api.c
Examining data/libuev-2.3.1/tests/event.c
Examining data/libuev-2.3.1/tests/active.c
Examining data/libuev-2.3.1/tests/check.h

FINAL RESULTS:

data/libuev-2.3.1/tests/check.h:15:7:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
      fprintf(stderr,							\
data/libuev-2.3.1/tests/check.h:34:8:  [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.
	len = vsnprintf(buf, sizeof(buf), fmt, ap);
data/libuev-2.3.1/tests/complete.c:70:2:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	fprintf(stderr, w->signo == SIGINT ? "^Cv" : "^\v");
data/libuev-2.3.1/src/bench.c:80:37:  [3] (random) drand48:
  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.
		uev_timer_set(&evto[idx], 10000 + drand48() * 1000, 0);
data/libuev-2.3.1/src/bench.c:112:36:  [3] (random) drand48:
  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.
			uev_timer_set(&evto[i], 10000 + drand48() * 1000, 0);
data/libuev-2.3.1/src/bench.c:165:14:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt(argc, argv, "a:n:tw:")) != -1) {
data/libuev-2.3.1/examples/joystick.c:81:7:  [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).
	fd = open("/dev/input/js0", O_RDONLY, O_NONBLOCK);
data/libuev-2.3.1/examples/redirect.c:24: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[256];
data/libuev-2.3.1/src/bench.c:168:17:  [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).
			num_active = atoi(optarg);
data/libuev-2.3.1/src/bench.c:172:16:  [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).
			num_pipes = atoi(optarg);
data/libuev-2.3.1/src/bench.c:180:17:  [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).
			num_writes = atoi(optarg);
data/libuev-2.3.1/tests/api.c:25:7:  [2] (misc) fopen:
  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).
	fp = fopen("/dev/one", "r");
data/libuev-2.3.1/tests/check.h:26: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[80];
data/libuev-2.3.1/tests/complete.c:76: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[50];
data/libuev-2.3.1/examples/joystick.c:53:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(w->fd, &e, sizeof(e));
data/libuev-2.3.1/examples/redirect.c:32:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(w->fd, buf, sizeof(buf));
data/libuev-2.3.1/src/bench.c:82:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	count += read(w->fd, &ch, sizeof(ch));
data/libuev-2.3.1/src/uev.c:367:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(w->fd, &fdsi, sz) != sz) {
data/libuev-2.3.1/src/uev.c:376:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(w->fd, &exp, sizeof(exp)) != sizeof(exp)) {
data/libuev-2.3.1/src/uev.c:388:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(w->fd, &exp, sizeof(exp)) != sizeof(exp)) {
data/libuev-2.3.1/src/uev.c:405:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				if (read(w->fd, &exp, sizeof(exp)) != sizeof(exp))
data/libuev-2.3.1/tests/check.h:41:33:  [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).
		write(STDERR_FILENO, success, strlen(success));
data/libuev-2.3.1/tests/check.h:43:33:  [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).
		write(STDERR_FILENO, failure, strlen(failure));
data/libuev-2.3.1/tests/check.h:72:9:  [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).
	pos  = strlen(buf);
data/libuev-2.3.1/tests/complete.c:90:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	len = read(w->fd, msg, sizeof(msg));
data/libuev-2.3.1/tests/event.c:67:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(10000);

ANALYSIS SUMMARY:

Hits = 26
Lines analyzed = 2492 in approximately 0.11 seconds (22550 lines/second)
Physical Source Lines of Code (SLOC) = 1319
Hits@level = [0]  32 [1]  12 [2]   8 [3]   3 [4]   3 [5]   0
Hits@level+ = [0+]  58 [1+]  26 [2+]  14 [3+]   6 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 43.9727 [1+] 19.7119 [2+] 10.6141 [3+] 4.5489 [4+] 2.27445 [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.