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/xkbset-0.5/xkbset.h
Examining data/xkbset-0.5/misc.c
Examining data/xkbset-0.5/main.c

FINAL RESULTS:

data/xkbset-0.5/main.c:103:59:  [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.
    fprintf(stderr, "XKB not supported for display %s\n", getenv("DISPLAY"));
data/xkbset-0.5/misc.c:38:10:  [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).
  *val = atoi(arg);
data/xkbset-0.5/misc.c:48:17:  [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.
Bool get_64_hex(char *arg, char array[32]) {
data/xkbset-0.5/misc.c:48:28:  [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.
Bool get_64_hex(char *arg, char array[32]) {
data/xkbset-0.5/xkbset.h:39:17:  [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.
Bool get_64_hex(char *arg, char array[32]);
data/xkbset-0.5/xkbset.h:39:28:  [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.
Bool get_64_hex(char *arg, char array[32]);
data/xkbset-0.5/misc.c:35:19:  [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).
  for (i=0;i<(int)strlen(arg);i++)

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 255 in approximately 0.03 seconds (9775 lines/second)
Physical Source Lines of Code (SLOC) = 132
Hits@level = [0]  10 [1]   1 [2]   5 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  17 [1+]   7 [2+]   6 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 128.788 [1+] 53.0303 [2+] 45.4545 [3+] 7.57576 [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.