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/ibus-kmfl-11.0.101/src/engine.c
Examining data/ibus-kmfl-11.0.101/src/engine.h
Examining data/ibus-kmfl-11.0.101/src/kmflutil.c
Examining data/ibus-kmfl-11.0.101/src/kmflutil.h
Examining data/ibus-kmfl-11.0.101/src/main.c

FINAL RESULTS:

data/ibus-kmfl-11.0.101/src/kmflutil.c:315:54:  [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.
    local_keyboard_path= g_strdup_printf("%s/.kmfl", getenv("HOME"));
data/ibus-kmfl-11.0.101/src/engine.c:319:9:  [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 key_vec[32];
data/ibus-kmfl-11.0.101/src/kmflutil.c:186:5:  [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 buf[1024];
data/ibus-kmfl-11.0.101/src/kmflutil.c:398:9:  [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 s[2];
data/ibus-kmfl-11.0.101/src/kmflutil.c:128:9:  [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).
    if (strlen(icon_file) > 0) {

ANALYSIS SUMMARY:

Hits = 5
Lines analyzed = 1230 in approximately 0.06 seconds (21980 lines/second)
Physical Source Lines of Code (SLOC) = 844
Hits@level = [0]   1 [1]   1 [2]   3 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]   6 [1+]   5 [2+]   4 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 7.109 [1+] 5.92417 [2+] 4.73934 [3+] 1.18483 [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.