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/xf86-input-mtrack-0.3.1/driver/mprops.c
Examining data/xf86-input-mtrack-0.3.1/driver/mtrack.c
Examining data/xf86-input-mtrack-0.3.1/include/button.h
Examining data/xf86-input-mtrack-0.3.1/include/capabilities.h
Examining data/xf86-input-mtrack-0.3.1/include/common.h
Examining data/xf86-input-mtrack-0.3.1/include/gestures.h
Examining data/xf86-input-mtrack-0.3.1/include/hwstate.h
Examining data/xf86-input-mtrack-0.3.1/include/mconfig.h
Examining data/xf86-input-mtrack-0.3.1/include/mprops.h
Examining data/xf86-input-mtrack-0.3.1/include/mtouch.h
Examining data/xf86-input-mtrack-0.3.1/include/mtstate.h
Examining data/xf86-input-mtrack-0.3.1/include/trig.h
Examining data/xf86-input-mtrack-0.3.1/src/capabilities.c
Examining data/xf86-input-mtrack-0.3.1/src/gestures.c
Examining data/xf86-input-mtrack-0.3.1/src/hwstate.c
Examining data/xf86-input-mtrack-0.3.1/src/mconfig.c
Examining data/xf86-input-mtrack-0.3.1/src/mtouch.c
Examining data/xf86-input-mtrack-0.3.1/src/mtstate.c
Examining data/xf86-input-mtrack-0.3.1/src/trig.c
Examining data/xf86-input-mtrack-0.3.1/tools/mtrack-test.c

FINAL RESULTS:

data/xf86-input-mtrack-0.3.1/src/capabilities.c:27:25:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
#define ADDCAP(s, c, x) strcat(s, c->has_##x ? " " #x : "")
data/xf86-input-mtrack-0.3.1/tools/mtrack-test.c:31:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, format, args);
data/xf86-input-mtrack-0.3.1/driver/mtrack.c:89: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 btmap[DIM_BUTTON + 1] = {
data/xf86-input-mtrack-0.3.1/include/capabilities.h: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 devname[32];
data/xf86-input-mtrack-0.3.1/include/common.h:73: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(dest, src, sizeof(struct timeval));
data/xf86-input-mtrack-0.3.1/src/capabilities.c:168: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 line[1024];
data/xf86-input-mtrack-0.3.1/tools/mtrack-test.c:106:11:  [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).
	int fd = open(argv[1], O_RDONLY | O_NONBLOCK);
data/xf86-input-mtrack-0.3.1/driver/mprops.c:65:24:  [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).
	atom = MakeAtom(name, strlen(name), TRUE);
data/xf86-input-mtrack-0.3.1/driver/mprops.c:72:29:  [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).
	Atom atom = MakeAtom(name, strlen(name), TRUE);
data/xf86-input-mtrack-0.3.1/driver/mprops.c:84:45:  [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).
		mprops.float_type = MakeAtom(XATOM_FLOAT, strlen(XATOM_FLOAT), TRUE);

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 3813 in approximately 0.15 seconds (25962 lines/second)
Physical Source Lines of Code (SLOC) = 2849
Hits@level = [0]   9 [1]   3 [2]   5 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+]  19 [1+]  10 [2+]   7 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 6.66901 [1+] 3.51 [2+] 2.457 [3+] 0.702001 [4+] 0.702001 [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.