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/fcitx-skk-0.1.4/gui/adddictdialog.cpp
Examining data/fcitx-skk-0.1.4/gui/adddictdialog.h
Examining data/fcitx-skk-0.1.4/gui/common.h
Examining data/fcitx-skk-0.1.4/gui/dictmodel.cpp
Examining data/fcitx-skk-0.1.4/gui/dictmodel.h
Examining data/fcitx-skk-0.1.4/gui/dictwidget.cpp
Examining data/fcitx-skk-0.1.4/gui/dictwidget.h
Examining data/fcitx-skk-0.1.4/gui/main.cpp
Examining data/fcitx-skk-0.1.4/gui/main.h
Examining data/fcitx-skk-0.1.4/gui/rulemodel.cpp
Examining data/fcitx-skk-0.1.4/gui/rulemodel.h
Examining data/fcitx-skk-0.1.4/src/skk-config.c
Examining data/fcitx-skk-0.1.4/src/skk.c
Examining data/fcitx-skk-0.1.4/src/skk.h

FINAL RESULTS:

data/fcitx-skk-0.1.4/src/skk.c:287:63:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
                    SkkUserDict* userdict = skk_user_dict_new(realpath, encoding, NULL);
data/fcitx-skk-0.1.4/gui/dictmodel.cpp:43:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (f.open(QIODevice::ReadOnly)) {
data/fcitx-skk-0.1.4/gui/dictmodel.cpp:55:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!f.open(fp, QIODevice::ReadOnly)) {
data/fcitx-skk-0.1.4/gui/dictmodel.cpp:110:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!tempFile.open()) {
data/fcitx-skk-0.1.4/gui/dictwidget.cpp:83:15:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        if (f.open(fp, QIODevice::ReadOnly)) {;
data/fcitx-skk-0.1.4/gui/dictwidget.cpp:112:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (f.open(fp, QIODevice::WriteOnly)) {
data/fcitx-skk-0.1.4/src/skk.c:300:29:  [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).
                int iPort = atoi(port);
data/fcitx-skk-0.1.4/gui/adddictdialog.cpp:111:42:  [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).
            path = dir.filePath(path.mid(strlen(FCITX_CONFIG_DIR) + 1));
data/fcitx-skk-0.1.4/src/skk.c:135: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).
    if (output && strlen(output) > 0) {
data/fcitx-skk-0.1.4/src/skk.c:267:24:  [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(path) > 4 && !strcmp(path + strlen(path) - 4, ".cdb")) {
data/fcitx-skk-0.1.4/src/skk.c:267:59:  [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(path) > 4 && !strcmp(path + strlen(path) - 4, ".cdb")) {
data/fcitx-skk-0.1.4/src/skk.c:281:61:  [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 (strncmp(path, "$FCITX_CONFIG_DIR/", strlen("$FCITX_CONFIG_DIR/")) == 0) {
data/fcitx-skk-0.1.4/src/skk.c:282:66:  [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).
                        FcitxXDGGetFileUserWithPrefix("", path + strlen("$FCITX_CONFIG_DIR/"), NULL, &needfree);
data/fcitx-skk-0.1.4/src/skk.c:561: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).
    if (output && strlen(output) > 0) {
data/fcitx-skk-0.1.4/src/skk.c:689:18:  [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 len = strlen(preeditString);

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 1778 in approximately 0.06 seconds (27383 lines/second)
Physical Source Lines of Code (SLOC) = 1277
Hits@level = [0]   0 [1]   8 [2]   6 [3]   1 [4]   0 [5]   0
Hits@level+ = [0+]  15 [1+]  15 [2+]   7 [3+]   1 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 11.7463 [1+] 11.7463 [2+] 5.4816 [3+] 0.783085 [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.