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-rime-0.3.2/src/fcitx-rime.c Examining data/fcitx-rime-0.3.2/gui/src/keynametable.h Examining data/fcitx-rime-0.3.2/gui/src/keysymgen.h Examining data/fcitx-rime-0.3.2/gui/src/Common.h Examining data/fcitx-rime-0.3.2/gui/src/keysym.h Examining data/fcitx-rime-0.3.2/gui/src/ConfigMain.h Examining data/fcitx-rime-0.3.2/gui/src/Main.cpp Examining data/fcitx-rime-0.3.2/gui/src/Main.h Examining data/fcitx-rime-0.3.2/gui/src/Model.cpp Examining data/fcitx-rime-0.3.2/gui/src/Model.h Examining data/fcitx-rime-0.3.2/gui/src/ConfigMain.cpp Examining data/fcitx-rime-0.3.2/gui/src/RimeConfigParser.cpp Examining data/fcitx-rime-0.3.2/gui/src/RimeConfigParser.h FINAL RESULTS: data/fcitx-rime-0.3.2/gui/src/ConfigMain.cpp:484:17: [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 (!fd.open(QIODevice::ReadOnly)) { data/fcitx-rime-0.3.2/src/fcitx-rime.c:434: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 strChoose[11]; data/fcitx-rime-0.3.2/gui/src/Model.cpp:76:21: [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 (found + strlen(NAME) > lastModifier) { \ data/fcitx-rime-0.3.2/gui/src/Model.cpp:77:36: [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). lastModifier = found + strlen(NAME); \ data/fcitx-rime-0.3.2/src/fcitx-rime.c:337:62: [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). int num_select_keys = context.menu.select_keys ? strlen(context.menu.select_keys) : 0; data/fcitx-rime-0.3.2/src/fcitx-rime.c:400:50: [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). FcitxInputStateSetClientCursorPos(input, strlen(context.commit_text_preview)); data/fcitx-rime-0.3.2/src/fcitx-rime.c:426:39: [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 (context.composition.sel_end < strlen(context.composition.preedit)) { data/fcitx-rime-0.3.2/src/fcitx-rime.c:437:58: [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). int num_select_keys = context.menu.select_keys ? strlen(context.menu.select_keys) : 0; ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 11058 in approximately 0.36 seconds (30813 lines/second) Physical Source Lines of Code (SLOC) = 10574 Hits@level = [0] 0 [1] 6 [2] 2 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 8 [1+] 8 [2+] 2 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 0.756573 [1+] 0.756573 [2+] 0.189143 [3+] 0 [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.