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/xdo-0.5.7/helpers.c
Examining data/xdo-0.5.7/helpers.h
Examining data/xdo-0.5.7/xdo.c
Examining data/xdo-0.5.7/xdo.h

FINAL RESULTS:

data/xdo-0.5.7/helpers.c:10: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, fmt, ap);
data/xdo-0.5.7/helpers.c:19: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, fmt, ap);
data/xdo-0.5.7/xdo.c:71:16:  [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 ((opt = getopt(argc, argv, "rcCdDsmn:N:a:p:k:t:x:y:h:w:")) != -1) {
data/xdo-0.5.7/xdo.c:98:15:  [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).
				cfg.pid = atoi(optarg);
data/xdo-0.5.7/xdo.c:104:20:  [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).
				cfg.evt_code = atoi(optarg);
data/xdo-0.5.7/xdo.c:153: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 class[MAXLEN] = {0};
data/xdo-0.5.7/xdo.c:237: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 c[MAXLEN] = {0}, i[MAXLEN] = {0}, n[MAXLEN] = {0};
data/xdo-0.5.7/xdo.c:417: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).
		uint32_t v = atoi(cfg.v); \
data/xdo-0.5.7/xdo.c:505:15:  [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).
	uint16_t x = atoi(cfg.x);
data/xdo-0.5.7/xdo.c:506:15:  [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).
	uint16_t y = atoi(cfg.y);
data/xdo-0.5.7/xdo.c:322:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(class, icr.class_name, len);
data/xdo-0.5.7/xdo.c:333:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(instance, icr.instance_name, len);
data/xdo-0.5.7/xdo.c:344:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(wm_name, itr.name, MIN(len, itr.name_len));

ANALYSIS SUMMARY:

Hits = 13
Lines analyzed = 619 in approximately 0.04 seconds (16477 lines/second)
Physical Source Lines of Code (SLOC) = 554
Hits@level = [0]   4 [1]   3 [2]   7 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  17 [1+]  13 [2+]  10 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 30.6859 [1+] 23.4657 [2+] 18.0505 [3+] 5.41516 [4+] 3.61011 [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.