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/lomoco-1.0.0/src/cmdline.c
Examining data/lomoco-1.0.0/src/cmdline.h
Examining data/lomoco-1.0.0/src/lomoco.c
Examining data/lomoco-1.0.0/src/lomoco.h

FINAL RESULTS:

data/lomoco-1.0.0/src/lomoco.c:84:11:  [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[12] = {0};
data/lomoco-1.0.0/src/lomoco.c:222:11:  [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[4] = {0};
data/lomoco-1.0.0/src/lomoco.c:258:11:  [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[4] = {0};
data/lomoco-1.0.0/src/lomoco.c:294: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[4] = {0};
data/lomoco-1.0.0/src/lomoco.c:297: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).
	if ((fd = open(usbhid_mousepoll, O_RDONLY)) != -1) {
data/lomoco-1.0.0/src/lomoco.c:299: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).
			mousepoll = atoi (buf);
data/lomoco-1.0.0/src/lomoco.c:616: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 product[128];
data/lomoco-1.0.0/src/cmdline.c:173:8:  [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).
		    (strlen (arg) != 3) ||
data/lomoco-1.0.0/src/cmdline.c:188:8:  [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).
		    (strlen (arg) != 3) ||
data/lomoco-1.0.0/src/lomoco.c:298:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if ((read (fd, buf, (sizeof(buf) - 1))) < (sizeof(buf) - 1))

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 1227 in approximately 0.07 seconds (17329 lines/second)
Physical Source Lines of Code (SLOC) = 691
Hits@level = [0]  85 [1]   3 [2]   7 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  95 [1+]  10 [2+]   7 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 137.482 [1+] 14.4718 [2+] 10.1302 [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.