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/xhk-1.2/src/xhk.c
Examining data/xhk-1.2/src/xhk-layout.h

FINAL RESULTS:

data/xhk-1.2/src/xhk.c:54:52:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define PRINT(level, x ...) 	if (verbose >= level) printf(x)
data/xhk-1.2/src/xhk.c:95:23:  [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.
        displayName = getenv("DISPLAY");
data/xhk-1.2/src/xhk.c:714:18:  [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, "dvhmt")) != -1)
data/xhk-1.2/src/xhk.c:164:14:  [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 mask[1] = { 0 }; /* the actual mask */

ANALYSIS SUMMARY:

Hits = 4
Lines analyzed = 841 in approximately 0.06 seconds (15024 lines/second)
Physical Source Lines of Code (SLOC) = 564
Hits@level = [0]  19 [1]   0 [2]   1 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  23 [1+]   4 [2+]   4 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 40.7801 [1+] 7.0922 [2+] 7.0922 [3+] 5.31915 [4+] 1.77305 [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.