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-lua-5.0.0/src/addonloader/luaaddon.cpp Examining data/fcitx5-lua-5.0.0/src/addonloader/luaaddon.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luaaddon_public.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luaaddonloader.cpp Examining data/fcitx5-lua-5.0.0/src/addonloader/luaaddonloader.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luaaddonstate.cpp Examining data/fcitx5-lua-5.0.0/src/addonloader/luaaddonstate.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luafunc.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luahelper.cpp Examining data/fcitx5-lua-5.0.0/src/addonloader/luahelper.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luastate.cpp Examining data/fcitx5-lua-5.0.0/src/addonloader/luastate.h Examining data/fcitx5-lua-5.0.0/src/addonloader/luastate_details.h Examining data/fcitx5-lua-5.0.0/src/file2cstring/file2cstring.cpp Examining data/fcitx5-lua-5.0.0/test/testlua.cpp FINAL RESULTS: data/fcitx5-lua-5.0.0/src/file2cstring/file2cstring.cpp:25: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 buffer[1024]; data/fcitx5-lua-5.0.0/src/addonloader/luaaddonstate.cpp:384: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). auto len = strlen(str); data/fcitx5-lua-5.0.0/src/file2cstring/file2cstring.cpp:16: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(argv[1]) == 0) { data/fcitx5-lua-5.0.0/src/file2cstring/file2cstring.cpp:31:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in.read(buffer, sizeof(buffer)); ANALYSIS SUMMARY: Hits = 4 Lines analyzed = 1439 in approximately 0.06 seconds (24407 lines/second) Physical Source Lines of Code (SLOC) = 1117 Hits@level = [0] 0 [1] 3 [2] 1 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 4 [1+] 4 [2+] 1 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 3.58102 [1+] 3.58102 [2+] 0.895255 [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.