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/fcitx5-gtk-5.0.0/fcitx-gclient/fcitxgclient.c
Examining data/fcitx5-gtk-5.0.0/fcitx-gclient/fcitxgclient.h
Examining data/fcitx5-gtk-5.0.0/fcitx-gclient/fcitxgwatcher.c
Examining data/fcitx5-gtk-5.0.0/fcitx-gclient/fcitxgwatcher.h
Examining data/fcitx5-gtk-5.0.0/gtk2/fcitxim.c
Examining data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp
Examining data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.h

FINAL RESULTS:

data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:64:25:  [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.
    const char *value = getenv(name);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:415:30:  [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.
        const char *locale = getenv("LC_ALL");
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:417:22:  [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.
            locale = getenv("LC_CTYPE");
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:419:22:  [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.
            locale = getenv("LANG");
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:1466:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ev.xclient.data.b, uuid, 16);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:623:26:  [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).
        size_t bytelen = strlen(gstr->str);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:633:47:  [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).
            pango_attr->end_index = bytelen + strlen(s);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:639:47:  [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).
            pango_attr->end_index = bytelen + strlen(s);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:645:47:  [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).
            pango_attr->end_index = bytelen + strlen(s);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:651:47:  [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).
            pango_attr->end_index = bytelen + strlen(s);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:710:47:  [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).
            pango_attr->end_index = bytelen + strlen(s);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:714:47:  [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).
            pango_attr->end_index = bytelen + strlen(s);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:744:13:  [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(context->preedit_string) != 0) {
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:1031:15:  [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).
        len = strlen(text);
data/fcitx5-gtk-5.0.0/gtk2/fcitximcontext.cpp:1146:45:  [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).
                    pango_attr->end_index = strlen(*str);

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 3068 in approximately 0.09 seconds (35666 lines/second)
Physical Source Lines of Code (SLOC) = 2275
Hits@level = [0]   0 [1]  10 [2]   1 [3]   4 [4]   0 [5]   0
Hits@level+ = [0+]  15 [1+]  15 [2+]   5 [3+]   4 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 6.59341 [1+] 6.59341 [2+] 2.1978 [3+] 1.75824 [4+]   0 [5+]   0
Symlinks skipped = 3 (--allowlink overrides but see doc for security issue)
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.