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/gxkb-0.8.2/src/xkb-config.h
Examining data/gxkb-0.8.2/src/xkb-util.c
Examining data/gxkb-0.8.2/src/xkb-config.c
Examining data/gxkb-0.8.2/src/xkb-callbacks.h
Examining data/gxkb-0.8.2/src/xkb-callbacks.c
Examining data/gxkb-0.8.2/src/xkb-util.h
Examining data/gxkb-0.8.2/src/gxkb.c
Examining data/gxkb-0.8.2/src/statusicon.c
Examining data/gxkb-0.8.2/src/statusicon.h

FINAL RESULTS:

data/gxkb-0.8.2/src/gxkb.c:335:16:  [3] (buffer) getopt_long:
  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.
        iarg = getopt_long( argc, argv, "s:vh", longopts, &index );
data/gxkb-0.8.2/src/xkb-util.c:81:27:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
        ? g_strjoin( "/", g_get_home_dir(), ".local/share", NULL )
data/gxkb-0.8.2/src/xkb-util.c:103:27:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
        ? g_strjoin( "/", g_get_home_dir(), ".config", NULL )
data/gxkb-0.8.2/src/xkb-config.c:499:16:  [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( settings->kbd_config->toggle_option ) > 0 )
data/gxkb-0.8.2/src/xkb-config.c:509:16:  [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( settings->kbd_config->compose_key_position ) > 0 )
data/gxkb-0.8.2/src/xkb-util.c:71:25:  [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).
    return ( variant && strlen( variant ) > 0 )

ANALYSIS SUMMARY:

Hits = 6
Lines analyzed = 2011 in approximately 0.08 seconds (26775 lines/second)
Physical Source Lines of Code (SLOC) = 1429
Hits@level = [0]   0 [1]   3 [2]   0 [3]   3 [4]   0 [5]   0
Hits@level+ = [0+]   6 [1+]   6 [2+]   3 [3+]   3 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.19874 [1+] 4.19874 [2+] 2.09937 [3+] 2.09937 [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.