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-4.2.9.8/tools/gui/common.h Examining data/fcitx-4.2.9.8/tools/gui/wrapper/wrapperapp.h Examining data/fcitx-4.2.9.8/tools/gui/wrapper/wrapperapp.cpp Examining data/fcitx-4.2.9.8/tools/gui/wrapper/mainwindow.h Examining data/fcitx-4.2.9.8/tools/gui/wrapper/mainwindow.cpp Examining data/fcitx-4.2.9.8/tools/gui/wrapper/main.cpp Examining data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c Examining data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c Examining data/fcitx-4.2.9.8/tools/cli/txt2mb.c Examining data/fcitx-4.2.9.8/tools/cli/scel2org.c Examining data/fcitx-4.2.9.8/tools/cli/readPYMB.c Examining data/fcitx-4.2.9.8/tools/cli/readPYBase.c Examining data/fcitx-4.2.9.8/tools/cli/pyTools.h Examining data/fcitx-4.2.9.8/tools/cli/pyTools.c Examining data/fcitx-4.2.9.8/tools/cli/mb2txt.c Examining data/fcitx-4.2.9.8/tools/cli/mb2org.c Examining data/fcitx-4.2.9.8/tools/cli/fcitx-remote.c Examining data/fcitx-4.2.9.8/tools/cli/fcitx-path-maker.c Examining data/fcitx-4.2.9.8/tools/cli/createPYMB.c Examining data/fcitx-4.2.9.8/test/testxdg.c Examining data/fcitx-4.2.9.8/test/testutf8.c Examining data/fcitx-4.2.9.8/test/testunicode.c Examining data/fcitx-4.2.9.8/test/teststring.c Examining data/fcitx-4.2.9.8/test/testsort.c Examining data/fcitx-4.2.9.8/test/testpinyin.c Examining data/fcitx-4.2.9.8/test/testobjpool.c Examining data/fcitx-4.2.9.8/test/testmessage.c Examining data/fcitx-4.2.9.8/test/testhotkey.c Examining data/fcitx-4.2.9.8/test/testhandlertable.c Examining data/fcitx-4.2.9.8/test/testdbussocket.c Examining data/fcitx-4.2.9.8/test/testdbuslaunch.c Examining data/fcitx-4.2.9.8/test/testconfig.c Examining data/fcitx-4.2.9.8/test/testcast.c Examining data/fcitx-4.2.9.8/test/testbacktrace.c Examining data/fcitx-4.2.9.8/test/testarray.c Examining data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c Examining data/fcitx-4.2.9.8/src/ui/classic/tray.h Examining data/fcitx-4.2.9.8/src/ui/classic/tray.c Examining data/fcitx-4.2.9.8/src/ui/classic/skinconfig.c Examining data/fcitx-4.2.9.8/src/ui/classic/skin.h Examining data/fcitx-4.2.9.8/src/ui/classic/skin.c Examining data/fcitx-4.2.9.8/src/ui/classic/classicuiinterface.h Examining data/fcitx-4.2.9.8/src/ui/classic/classicuiconfig.c Examining data/fcitx-4.2.9.8/src/ui/classic/classicui.h Examining data/fcitx-4.2.9.8/src/ui/classic/classicui.c Examining data/fcitx-4.2.9.8/src/ui/classic/XlibWindow.h Examining data/fcitx-4.2.9.8/src/ui/classic/XlibWindow.c Examining data/fcitx-4.2.9.8/src/ui/classic/TrayWindow.h Examining data/fcitx-4.2.9.8/src/ui/classic/TrayWindow.c Examining data/fcitx-4.2.9.8/src/ui/classic/MenuWindow.h Examining data/fcitx-4.2.9.8/src/ui/classic/MenuWindow.c Examining data/fcitx-4.2.9.8/src/ui/classic/MainWindow.h Examining data/fcitx-4.2.9.8/src/ui/classic/MainWindow.c Examining data/fcitx-4.2.9.8/src/ui/classic/InputWindow.h Examining data/fcitx-4.2.9.8/src/ui/classic/InputWindow.c Examining data/fcitx-4.2.9.8/src/ui/cairostuff/font.h Examining data/fcitx-4.2.9.8/src/ui/cairostuff/font.c Examining data/fcitx-4.2.9.8/src/ui/cairostuff/cairostuff.h Examining data/fcitx-4.2.9.8/src/ui/cairostuff/cairostuff.c Examining data/fcitx-4.2.9.8/src/module/xkbdbus/xkbdbus.c Examining data/fcitx-4.2.9.8/src/module/xkb/xkbconfig.c Examining data/fcitx-4.2.9.8/src/module/xkb/xkb.h Examining data/fcitx-4.2.9.8/src/module/xkb/xkb.c Examining data/fcitx-4.2.9.8/src/module/xkb/xkb-internal.h Examining data/fcitx-4.2.9.8/src/module/xkb/rules.h Examining data/fcitx-4.2.9.8/src/module/xkb/rules.c Examining data/fcitx-4.2.9.8/src/module/x11/xerrorhandler.h Examining data/fcitx-4.2.9.8/src/module/x11/xerrorhandler.c Examining data/fcitx-4.2.9.8/src/module/x11/x11stuff.h Examining data/fcitx-4.2.9.8/src/module/x11/x11stuff.c Examining data/fcitx-4.2.9.8/src/module/x11/x11stuff-internal.h Examining data/fcitx-4.2.9.8/src/module/x11/x11selection.h Examining data/fcitx-4.2.9.8/src/module/x11/x11selection.c Examining data/fcitx-4.2.9.8/src/module/vk/vk.c Examining data/fcitx-4.2.9.8/src/module/unicode/unicode.c Examining data/fcitx-4.2.9.8/src/module/unicode/charselectdata.h Examining data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c Examining data/fcitx-4.2.9.8/src/module/spell/spellconfig.c Examining data/fcitx-4.2.9.8/src/module/spell/spell.h Examining data/fcitx-4.2.9.8/src/module/spell/spell.c Examining data/fcitx-4.2.9.8/src/module/spell/spell-presage.h Examining data/fcitx-4.2.9.8/src/module/spell/spell-presage.c Examining data/fcitx-4.2.9.8/src/module/spell/spell-internal.h Examining data/fcitx-4.2.9.8/src/module/spell/spell-enchant.h Examining data/fcitx-4.2.9.8/src/module/spell/spell-enchant.c Examining data/fcitx-4.2.9.8/src/module/spell/spell-custom.h Examining data/fcitx-4.2.9.8/src/module/spell/spell-custom.c Examining data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.h Examining data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c Examining data/fcitx-4.2.9.8/src/module/spell/dict/comp_spell_dict.c Examining data/fcitx-4.2.9.8/src/module/remote/remote.c Examining data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.h Examining data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c Examining data/fcitx-4.2.9.8/src/module/punc/punc.h Examining data/fcitx-4.2.9.8/src/module/punc/punc.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-map.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-map.c Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-internal.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.h Examining data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c Examining data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem_p.h Examining data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.h Examining data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c Examining data/fcitx-4.2.9.8/src/module/notificationitem/dbusmenu.c Examining data/fcitx-4.2.9.8/src/module/lua/luawrap.h Examining data/fcitx-4.2.9.8/src/module/lua/luamod.h Examining data/fcitx-4.2.9.8/src/module/lua/lua.c Examining data/fcitx-4.2.9.8/src/module/lua/luawrap.c Examining data/fcitx-4.2.9.8/src/module/imselector/imselector.c Examining data/fcitx-4.2.9.8/src/module/fullwidthchar/fullwidthchar.c Examining data/fcitx-4.2.9.8/src/module/freedesktop-notify/freedesktop-notify.h Examining data/fcitx-4.2.9.8/src/module/freedesktop-notify/freedesktop-notify.c Examining data/fcitx-4.2.9.8/src/module/dbusstuff/property.h Examining data/fcitx-4.2.9.8/src/module/dbusstuff/property.c Examining data/fcitx-4.2.9.8/src/module/dbus/watcher.c Examining data/fcitx-4.2.9.8/src/module/dbus/dbusstuff.h Examining data/fcitx-4.2.9.8/src/module/dbus/dbussocket.h Examining data/fcitx-4.2.9.8/src/module/dbus/dbussocket.c Examining data/fcitx-4.2.9.8/src/module/dbus/dbusremote.c Examining data/fcitx-4.2.9.8/src/module/dbus/dbuslauncher.h Examining data/fcitx-4.2.9.8/src/module/dbus/dbuslauncher.c Examining data/fcitx-4.2.9.8/src/module/dbus/dbusstuff.c Examining data/fcitx-4.2.9.8/src/module/clipboard/clipboardconfig.c Examining data/fcitx-4.2.9.8/src/module/clipboard/clipboard.h Examining data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c Examining data/fcitx-4.2.9.8/src/module/clipboard/clipboard-x11.h Examining data/fcitx-4.2.9.8/src/module/clipboard/clipboard-x11.c Examining data/fcitx-4.2.9.8/src/module/clipboard/clipboard-internal.h Examining data/fcitx-4.2.9.8/src/module/chttrans/chttrans_p.h Examining data/fcitx-4.2.9.8/src/module/chttrans/chttrans.h Examining data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c Examining data/fcitx-4.2.9.8/src/module/chttrans/chttrans-opencc.h Examining data/fcitx-4.2.9.8/src/module/chttrans/chttrans-opencc.c Examining data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.h Examining data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/ui.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/ui.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/ui-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/profile.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/profile.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/module.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/module.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/module-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/keys.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/keys.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/instance.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/instance.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/instance-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/ime.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/ime.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/ime-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/hook.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/hook.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/hook-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/frontend.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/frontend.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/fcitx.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/fcitx-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/context.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/context.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/context-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/configfile.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/configfile.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/candidate.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/candidate.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/candidate-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/addon.h Examining data/fcitx-4.2.9.8/src/lib/fcitx/addon.c Examining data/fcitx-4.2.9.8/src/lib/fcitx/addon-internal.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/uthash.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/utf8.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/utf8.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/sort_common.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/qsort_r.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/objpool.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/objpool.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/msort_r.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/memory.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/memory.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/log.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/log.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/keysymgen.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/keysym.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-utils/bitset.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/qtkeytransdata.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/qtkeytrans.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/qtkeytrans.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeysequencewidget_p.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeysequencewidget.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeysequencewidget.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeyboardproxy.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeyboardproxy.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeyboardlayout.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtkeyboardlayout.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtinputmethodproxy.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtinputmethodproxy.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtinputmethoditem.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtinputmethoditem.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtinputcontextproxy.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtinputcontextproxy.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtformattedpreedit.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtformattedpreedit.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection_p.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguiwidget.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguiwidget.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguiplugin.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguiplugin.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguifactory_p.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguifactory.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconfiguifactory.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqt_export.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/test/testkeysequencewidget.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-qt/test/testconnection.cpp Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxkbd.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxkbd.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxinputmethod.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxinputmethod.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxconnection.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxconnection.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxclient.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxclient.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-gclient/test/testgclient.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/sprintf.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/sprintf.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/keydata.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.h Examining data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c Examining data/fcitx-4.2.9.8/src/im/table/utf8_in_gb18030.h Examining data/fcitx-4.2.9.8/src/im/table/tabledict.h Examining data/fcitx-4.2.9.8/src/im/table/tabledict.c Examining data/fcitx-4.2.9.8/src/im/table/tableconfig.c Examining data/fcitx-4.2.9.8/src/im/table/table.h Examining data/fcitx-4.2.9.8/src/im/table/table.c Examining data/fcitx-4.2.9.8/src/im/qw/qw.c Examining data/fcitx-4.2.9.8/src/im/pinyin/spdata.h Examining data/fcitx-4.2.9.8/src/im/pinyin/sp.h Examining data/fcitx-4.2.9.8/src/im/pinyin/sp.c Examining data/fcitx-4.2.9.8/src/im/pinyin/pysplitdata.h Examining data/fcitx-4.2.9.8/src/im/pinyin/pydef.h Examining data/fcitx-4.2.9.8/src/im/pinyin/pyconfig.h Examining data/fcitx-4.2.9.8/src/im/pinyin/pyconfig.c Examining data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h Examining data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c Examining data/fcitx-4.2.9.8/src/im/pinyin/pyMapTable.h Examining data/fcitx-4.2.9.8/src/im/pinyin/pyMapTable.c Examining data/fcitx-4.2.9.8/src/im/pinyin/py.h Examining data/fcitx-4.2.9.8/src/im/pinyin/py.c Examining data/fcitx-4.2.9.8/src/im/pinyin/PYFA.h Examining data/fcitx-4.2.9.8/src/im/pinyin/PYFA.c Examining data/fcitx-4.2.9.8/src/im/keyboard/keyboardconfig.c Examining data/fcitx-4.2.9.8/src/im/keyboard/keyboard.h Examining data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c Examining data/fcitx-4.2.9.8/src/im/keyboard/isocodes.h Examining data/fcitx-4.2.9.8/src/im/keyboard/isocodes.c Examining data/fcitx-4.2.9.8/src/frontend/xim/ximqueue.h Examining data/fcitx-4.2.9.8/src/frontend/xim/ximqueue.c Examining data/fcitx-4.2.9.8/src/frontend/xim/ximhandler.h Examining data/fcitx-4.2.9.8/src/frontend/xim/ximhandler.c Examining data/fcitx-4.2.9.8/src/frontend/xim/ximconfig.c Examining data/fcitx-4.2.9.8/src/frontend/xim/xim.h Examining data/fcitx-4.2.9.8/src/frontend/xim/xim.c Examining data/fcitx-4.2.9.8/src/frontend/xim/IC.h Examining data/fcitx-4.2.9.8/src/frontend/xim/IC.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nUtil.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIMProto.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nClbk.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nAttr.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/XimProto.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/XimFunc.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/Xi18nX.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/Xi18nTr.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/Xi18n.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/IMdkit.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/IMValues.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/IMMethod.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/IMConn.c Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/FrameMgr.h Examining data/fcitx-4.2.9.8/src/frontend/xim/lib/FrameMgr.c Examining data/fcitx-4.2.9.8/src/frontend/qt/qtkey.h Examining data/fcitx-4.2.9.8/src/frontend/qt/qtkey.cpp Examining data/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontextplugin.cpp Examining data/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.h Examining data/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.cpp Examining data/fcitx-4.2.9.8/src/frontend/qt/fcitxwatcher.h Examining data/fcitx-4.2.9.8/src/frontend/qt/fcitxwatcher.cpp Examining data/fcitx-4.2.9.8/src/frontend/qt/fcitxqtdbustypes.h Examining data/fcitx-4.2.9.8/src/frontend/qt/fcitxqtdbustypes.cpp Examining data/fcitx-4.2.9.8/src/frontend/qt/fcitxinputcontextproxy.h Examining data/fcitx-4.2.9.8/src/frontend/qt/fcitxinputcontextproxy.cpp Examining data/fcitx-4.2.9.8/src/frontend/ipcportal/ipcportal.h Examining data/fcitx-4.2.9.8/src/frontend/ipcportal/ipcportal.c Examining data/fcitx-4.2.9.8/src/frontend/ipc/ipc.h Examining data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c Examining data/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.h Examining data/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c Examining data/fcitx-4.2.9.8/src/frontend/gtk2/fcitxim.c Examining data/fcitx-4.2.9.8/src/core/fcitx.c Examining data/fcitx-4.2.9.8/src/core/errorhandler.h Examining data/fcitx-4.2.9.8/src/core/errorhandler.c FINAL RESULTS: data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:338:5: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(message->msg[message->msgCount - 1].strMsg, data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:346:5: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(message->msg[position].strMsg, text, MESSAGE_MAX_LENGTH); data/fcitx-4.2.9.8/src/module/remote/remote.c:78:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(socketfile, 0600); data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c:402:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(ipcic->path, FCITX_IC_DBUS_PATH, ipcic->id); data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c:783:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(dbus_message_get_path(msg), FCITX_IC_DBUS_PATH, &id); data/fcitx-4.2.9.8/src/frontend/ipcportal/ipcportal.c:270:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(ipcic->path, FCITX_IC_DBUS_PORTAL_PATH, ipcic->id); data/fcitx-4.2.9.8/src/frontend/ipcportal/ipcportal.c:452:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf(dbus_message_get_path(msg), FCITX_IC_DBUS_PORTAL_PATH, &id); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:50:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, msg); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:117:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(keyboard->tempBuffer, keyboard->buffer); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:398:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(layoutFileName, 0)) data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:777:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, commit); data/fcitx-4.2.9.8/src/im/pinyin/PYFA.c:1262:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mhpy[iBaseCount].strMap, MHPYtemplate[iBaseCount].strMap); data/fcitx-4.2.9.8/src/im/pinyin/PYFA.c:1282:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pyconfig->PYTable[iBaseCount].strPY, data/fcitx-4.2.9.8/src/im/pinyin/py.c:603:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strTemp, pystate->pySelected[pystate->iPYSelected - 1].strPY); data/fcitx-4.2.9.8/src/im/pinyin/py.c:604:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strTemp, pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:605:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->strFindString, strTemp); data/fcitx-4.2.9.8/src/im/pinyin/py.c:668:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strTemp, pystate->pySelected[pystate->iPYSelected - 1].strPY); data/fcitx-4.2.9.8/src/im/pinyin/py.c:669:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strTemp, pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:670:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->strFindString, strTemp); data/fcitx-4.2.9.8/src/im/pinyin/py.c:697:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(outputString, pystate->pySelected[i].strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:702:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(outputString, pystate->findMap.strPYParsed[i]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:893:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strCodeInput, pystate->pySelected[i].strPY); data/fcitx-4.2.9.8/src/im/pinyin/py.c:894:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strCodeInput, pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:906:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strFindString, pystate->findMap.strPYParsed[i]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1042:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strMap, pystate->findMap.strMap[val]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1131:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAuto, baseSelected->strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1132:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAutoMap, pPYFA->strMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1133:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAuto, phraseSelected->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1134:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAutoMap, phraseSelected->strMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1155:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAuto, baseSelected->strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1156:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAutoMap, pPYFA->strMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1171:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), candWord->strWord); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1219:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->strPYRemindSource, pycandWord->cand.remind.phrase->strPhrase + pycandWord->cand.remind.iLength); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1220:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->strPYRemindMap, pycandWord->cand.remind.phrase->strMap + pycandWord->cand.remind.iLength); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1222:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), pBase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1241:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strHZString, pBase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1243:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strHZString, pPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1248:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAuto, pystate->pySelected[iLen].strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1249:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strPYAuto, strHZString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1253:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strHZString, pystate->pySelected[i].strMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1255:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strHZString, pBaseMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1257:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strHZString, pPhraseMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1261:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), pystate->strPYAuto); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1265:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->strPYRemindSource, pystate->strPYAuto); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1266:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->strPYRemindMap, strHZString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1283:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->pySelected[pystate->iPYSelected].strPY, pystate->findMap.strPYParsed[i]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1285:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->pySelected[pystate->iPYSelected].strMap, pBaseMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1287:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->pySelected[pystate->iPYSelected].strMap, pPhraseMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1288:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pystate->pySelected[pystate->iPYSelected].strHZ, strHZString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1292:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(pystate->strFindString, pystate->findMap.strPYParsed[i]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1322:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strMap, pystate->findMap.strMap[val]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1403:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str, PYFAList[pos.iPYFA].pyBase[pos.iBase].strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1404:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1590:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newPhrase->phrase.strMap, map + 2); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1591:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newPhrase->phrase.strPhrase, phrase + clen); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1707:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(pstr, 0)) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1768:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(pstr, 0)) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1842:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(pstr, 0)) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1896:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(freq->strPY, pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1908:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(HZTemp->strHZ, PYFAList[pycandWord->cand.base.iPYFA].pyBase[pycandWord->cand.base.iBase].strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2103:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strPY, str_PY); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2265:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strMap, PYFAList[i].strMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2304:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(totalMap, pystate->pySelected[i].strMap); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:129:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount], str_Map); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:130:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strPYParsed[parsePY->iHZCount++], strJP); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:137:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount], str_Map); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:138:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strPYParsed[parsePY->iHZCount++], strJP); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:145:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount], strJP); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:147:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount], str_Map); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:149:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strPYParsed[parsePY->iHZCount++], strJP); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:153:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(parsePY->strPYParsed[parsePY->iHZCount - 1], PY_SEPARATOR_S); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:237:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strTemp, pyconfig->PYTable[iIndex].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:241:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount], str_Map); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:252:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(parsePY->strPYParsed[parsePY->iHZCount++], strTemp); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:269:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(parsePY->strPYParsed[parsePY->iHZCount], consonantMapTable[iIndex].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:273:21: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount++], str_Map); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:287:25: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(parsePY->strPYParsed[parsePY->iHZCount], syllabaryMapTable[iIndex].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:291:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(parsePY->strMap[parsePY->iHZCount++], str_Map); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:335:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strPY, strPYorigin); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:416:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strPY, syllabaryMapTable[i].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:432:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strPY, consonantMapTable[i].strPY); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:258:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strQP, strTmp); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:260:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strQP, SPMap_S[iIndex1].strQP); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:262:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strQP, strSP); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:272:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strQP, strTmp); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:279:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str_QP, strQP); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:281:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strQP, SPMap_C[iIndex2].strQP); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:286:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strQP, str_QP); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:308:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strQP, strSP); data/fcitx-4.2.9.8/src/im/qw/qw.c:136:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), data/fcitx-4.2.9.8/src/im/table/table.c:841:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tbl->strTableRemindSource, tableCandWord->candWord.record->strHZ + strlen(tbl->strTableRemindSource)); data/fcitx-4.2.9.8/src/im/table/table.c:842:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), tbl->strTableRemindSource); data/fcitx-4.2.9.8/src/im/table/table.c:852:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tbl->strTableRemindSource, pCandWord); data/fcitx-4.2.9.8/src/im/table/table.c:853:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), pCandWord); data/fcitx-4.2.9.8/src/im/table/table.c:879:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), pCandWord); data/fcitx-4.2.9.8/src/im/table/table.c:893:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxPinyinGetFindString(tbl->owner), data/fcitx-4.2.9.8/src/im/table/table.c:904:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(FcitxInputStateGetRawInputBuffer(input), data/fcitx-4.2.9.8/src/im/table/table.c:1054:25: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(candWord.strExtra, rec->strHZ); data/fcitx-4.2.9.8/src/im/table/table.c:1057:25: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(candWord.strExtra, temp); data/fcitx-4.2.9.8/src/im/table/table.c:1313:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tbl->strTableRemindSource, tableCandWord->candWord.record->strHZ + strlen(tbl->strTableRemindSource)); data/fcitx-4.2.9.8/src/im/table/table.c:1316:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), tbl->strTableRemindSource); data/fcitx-4.2.9.8/src/im/table/table.c:1358:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), table->tableDict->fh[tableCandWord->candWord.iFHIndex].strFH); data/fcitx-4.2.9.8/src/im/table/table.c:1381:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strTemp, table->tableDict->hzLastInput[i].strHZ); data/fcitx-4.2.9.8/src/im/table/table.c:1556:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(state), candidateWord->strWord); data/fcitx-4.2.9.8/src/im/table/tabledict.c:170:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(recTemp->strCode, strCode); data/fcitx-4.2.9.8/src/im/table/tabledict.c:172:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(recTemp->strHZ, strHZ); data/fcitx-4.2.9.8/src/im/table/tabledict.c:269:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tableDict->fh[i].strFH, strBuf); data/fcitx-4.2.9.8/src/im/table/tabledict.c:456:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(pstr, 0)) data/fcitx-4.2.9.8/src/im/table/tabledict.c:509:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(pstr, F_OK)) data/fcitx-4.2.9.8/src/im/table/tabledict.c:595:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strHZ, tableDict->hzLastInput[j].strHZ); data/fcitx-4.2.9.8/src/im/table/tabledict.c:597:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strHZ, tableDict->hzLastInput[j + k].strHZ); data/fcitx-4.2.9.8/src/im/table/tabledict.c:610:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tableDict->autoPhrase[tableDict->iAutoPhrase].strCode, tableDict->strNewPhraseCode); data/fcitx-4.2.9.8/src/im/table/tabledict.c:611:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tableDict->autoPhrase[tableDict->iAutoPhrase].strHZ, strHZ); data/fcitx-4.2.9.8/src/im/table/tabledict.c:615:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tableDict->insertPoint->strCode, tableDict->strNewPhraseCode); data/fcitx-4.2.9.8/src/im/table/tabledict.c:616:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tableDict->insertPoint->strHZ, strHZ); data/fcitx-4.2.9.8/src/im/table/tabledict.c:734:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dictNew->strCode, strCode); data/fcitx-4.2.9.8/src/im/table/tabledict.c:736:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dictNew->strHZ, strHZ); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:680:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(str + len, key); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:730:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, key); data/fcitx-4.2.9.8/src/lib/fcitx-config/sprintf.c:36:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. ret = vsnprintf(NULL, 0, format, ap2); data/fcitx-4.2.9.8/src/lib/fcitx-config/sprintf.c:48:11: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. ret = vsnprintf(*ptr, ret + 1, format, ap2); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:74:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(opath, F_OK)) data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:81:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(opath, F_OK)) /* if path is not terminated with / */ data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxclient.c:618:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(self->priv->servicename, "%s-%d", FCITX_DBUS_SERVICE, data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxconnection.c:179:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(self->priv->servicename, "%s-%d", FCITX_DBUS_SERVICE, data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxinputmethod.c:358:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(servicename, "%s-%d", FCITX_DBUS_SERVICE, display_number); data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxkbd.c:113:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(servicename, "%s-%d", FCITX_DBUS_SERVICE, display_number); data/fcitx-4.2.9.8/src/lib/fcitx-utils/uthash.h:236:29: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define HASH_OOPS(...) do { fprintf(stderr, __VA_ARGS__); } while (0) data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:671:5: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(argv[0], argv); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:694:13: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(args[0], args); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:762:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(path, R_OK | X_OK) == 0); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:769:17: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. access(path, R_OK) == 0); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:641:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(instance->input), FcitxInputStateGetRawInputBuffer(instance->input)); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:1275:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), FcitxInputStateGetRawInputBuffer(input)); data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:116:13: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access(profileFileName, 0)) data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:317:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(message->msg[position].strMsg, MESSAGE_MAX_LENGTH, fmt, ap); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:900:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, message_strs[i]); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:926:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, message_strs[i]); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:969:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(result, strTemp); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:970:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(result, candWord->strWord); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:973:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(result, candWord->strExtra); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:294:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ret, strHZ); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:335:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ret, s2t->str); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:397:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ret, strHZ); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:438:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ret, t2s->str); data/fcitx-4.2.9.8/src/module/dbus/dbuslauncher.c:43:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fp = popen(cmd, "r"); data/fcitx-4.2.9.8/src/module/dbus/dbuslauncher.c:46:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fp = popen(DBUS_LAUNCH" --binary-syntax", "r"); data/fcitx-4.2.9.8/src/module/fullwidthchar/fullwidthchar.c:143:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(FcitxInstanceGetInputState(fwchar->owner)), sCornerTrans[sym - 32]); data/fcitx-4.2.9.8/src/module/fullwidthchar/fullwidthchar.c:168:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(ret, sCornerTrans[ps[0] - 32]); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:204:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(selected + len, buff); data/fcitx-4.2.9.8/src/module/punc/punc.c:329:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(FcitxInputStateGetOutputString(input), pPunc); data/fcitx-4.2.9.8/src/module/punc/punc.c:337:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(FcitxInputStateGetOutputString(input), pPunc); data/fcitx-4.2.9.8/src/module/punc/punc.c:340:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(FcitxInputStateGetOutputString(input), buf); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:291:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tempQuickPhrase.strCode, buf1); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:292:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tempQuickPhrase.strPhrase, p); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:408:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), strTemp ? strTemp : c); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:415:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(qpstate->buffer, buf); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:437:17: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:443:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), c); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:701:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(qpstate->buffer, (char*) candWord->priv); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:706:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), candWord->strWord); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:716:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), qpcand->cand->strPhrase); data/fcitx-4.2.9.8/src/module/remote/remote.c:103:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(uds_addr.sun_path, name); data/fcitx-4.2.9.8/src/module/unicode/unicode.c:186:17: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(uni->buffer, buf); data/fcitx-4.2.9.8/src/module/unicode/unicode.c:202:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), candWord->strWord); data/fcitx-4.2.9.8/src/module/vk/vk.c:709:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(FcitxInputStateGetOutputString(input), pstr); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:391:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (next, rules_file); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:396:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (next, model); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:401:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (next, all_layouts); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:406:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (next, all_variants); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:411:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy (next, all_options); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:613:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(cmb, msgstr); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:668:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(aux, msgstr); data/fcitx-4.2.9.8/test/testpinyin.c:18:9: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, parse->strPYParsed[i]); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:166:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(fpt, "%s", strPY); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:167:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(fpt, "%s\n", strPhrase); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:187:13: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(strMap, strTemp.strMap[iIndex]); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:215:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(phrase->strPhrase, strPhrase + fcitx_utf8_char_len(strPhrase)); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:216:25: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(phrase->strMap, strMap + 2); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:297:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(fps, "%s", strPY); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:298:9: [4] (buffer) fscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. fscanf(fps, "%s\n", strHZ); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:316:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(temp->strHZ, strHZ); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:317:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(temp->strPY, strMap); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:350:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strPY, pyList->strPY); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:374:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strPY, pyList->strPY); data/fcitx-4.2.9.8/tools/cli/fcitx-remote.c:58:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(uds_addr.sun_path, name); data/fcitx-4.2.9.8/tools/cli/mb2org.c:142:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(Map, pHZMap1->Map); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:152:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_VERNEW], iVersion); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:159:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_KEYCODE], strCode); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:164:5: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_LEN], iLen); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:171:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_PY], cPinyin); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:172:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_PYLEN], iPYLen); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:176:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(temp, strCode); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:178:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(temp, pyStr); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:181:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(temp, prStr); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:188:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_PROMPT], cPrompt); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:194:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_CONSTRUCTPHRASE], cPhrase); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:202:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(templ[TEMPL_INVALIDCHAR], strCode); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:155:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strInputCode, pstr); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:166:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(strIgnoreChars, pstr); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:451:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newRec->strCode, pstr); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:453:9: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(newRec->strHZ, strHZ); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:494:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(ofp, res_fmt, ap); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:518:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(ofp, orig_fmt, ap); data/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:478: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:480: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:482: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/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.cpp:62:26: [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/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.cpp:64:18: [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/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.cpp:66:18: [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/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.cpp:83: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/fcitx-4.2.9.8/src/frontend/xim/xim.c:152:18: [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. imname = getenv("XMODIFIERS"); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:212:9: [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. p = getenv("LC_CTYPE"); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:214:13: [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. p = getenv("LC_ALL"); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:216:17: [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. p = getenv("LANG"); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:299:26: [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/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:301:18: [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/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:303:18: [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/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:233: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 *xdgDirHome = getenv(homeEnv); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:243:32: [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 *env_home = getenv("HOME"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:419:27: [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 *display = getenv("DISPLAY"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:438:9: [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. p = getenv("LC_CTYPE"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:440:13: [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. p = getenv("LC_ALL"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:442:17: [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. p = getenv("LANG"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:456:9: [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. p = getenv("LC_CTYPE"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:458:13: [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. p = getenv("LC_ALL"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:460:17: [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. p = getenv("LANG"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:557: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. char* fcitxdir = getenv("FCITXDIR"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:725: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/fcitx-4.2.9.8/src/lib/fcitx/instance.c:51:40: [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. #define CHECK_ENV(env, value, icase) (!getenv(env) \ data/fcitx-4.2.9.8/src/lib/fcitx/instance.c:53:60: [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. (0 != strcmp(getenv(env), (value))) \ data/fcitx-4.2.9.8/src/lib/fcitx/instance.c:54:66: [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. : (0 != strcasecmp(getenv(env), (value))))) data/fcitx-4.2.9.8/src/lib/fcitx/instance.c:583:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "ru:dDs:hv", longOptions, &optionIndex)) != EOF) { data/fcitx-4.2.9.8/src/lib/fcitx/instance.c:824:23: [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. no_preedit_apps = getenv("FCITX_NO_PREEDIT_APPS"); data/fcitx-4.2.9.8/src/module/dbus/dbusremote.c:34:17: [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. char *env = getenv("FCITX_DBUS_ADDRESS"); data/fcitx-4.2.9.8/src/module/dbus/dbusremote.c:103:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "chortTeam:s:")) != -1) { data/fcitx-4.2.9.8/src/module/dbus/dbusstuff.c:189:14: [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. if (!getenv("DISPLAY") && !getenv("DBUS_SESSION_BUS_ADDRESS")) { data/fcitx-4.2.9.8/src/module/dbus/dbusstuff.c:189:36: [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. if (!getenv("DISPLAY") && !getenv("DBUS_SESSION_BUS_ADDRESS")) { data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c:243:57: [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. notificationitem->isUnity = fcitx_utils_strcmp0(getenv("XDG_CURRENT_DESKTOP"), "Unity") == 0; data/fcitx-4.2.9.8/src/module/xkb/xkb.c:767:16: [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. home = getenv("HOME"); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:224:32: [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. return fcitx_utils_strcmp0(getenv("XDG_CURRENT_DESKTOP"), "Unity") == 0; data/fcitx-4.2.9.8/test/testsort.c:83:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL)); data/fcitx-4.2.9.8/tools/cli/fcitx-remote.c:92:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "chortTs:")) != -1) { data/fcitx-4.2.9.8/tools/cli/mb2org.c:55:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "f:b:sh")) != -1) { data/fcitx-4.2.9.8/tools/cli/mb2txt.c:122:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "oh")) != -1) { data/fcitx-4.2.9.8/tools/cli/readPYBase.c:40:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "b:h")) != -1) { data/fcitx-4.2.9.8/tools/cli/readPYMB.c:42:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "f:sh")) != -1) { data/fcitx-4.2.9.8/tools/cli/scel2org.c:77:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt(argc, argv, "ao:h")) != -1) { data/fcitx-4.2.9.8/src/core/errorhandler.c:54: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[MINIMAL_BUFFER_SIZE]; data/fcitx-4.2.9.8/src/core/errorhandler.c:145:14: [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). fd = open(crashlog, O_WRONLY | O_CREAT | O_TRUNC, 0644); data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c:52: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 path[32]; data/fcitx-4.2.9.8/src/frontend/ipcportal/ipcportal.c:52: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 path[64]; data/fcitx-4.2.9.8/src/frontend/qt/fcitxwatcher.cpp:162: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 (!file.open(QIODevice::ReadOnly)) data/fcitx-4.2.9.8/src/frontend/qt/fcitxwatcher.cpp:167: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[BUFSIZE]; data/fcitx-4.2.9.8/src/frontend/qt/qfcitxinputcontext.cpp:383: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 strbuf[64]; data/fcitx-4.2.9.8/src/frontend/xim/IC.c:116:13: [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(rec->pre_attr.base_font, pre_attr->value, size); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:152:13: [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(rec->sts_attr.base_font, sts_attr->value, size); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:290:13: [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(p, &base_len, sizeof(CARD16)); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:331:13: [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(p, &base_len, sizeof(CARD16)); data/fcitx-4.2.9.8/src/frontend/xim/lib/FrameMgr.c:398:13: [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(fm->area + fm->idx, *(char **) data, info.num); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:55:9: [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(buf, p, value_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:64:9: [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(buf, &value, value_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:73:9: [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(buf, &value, value_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:136: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(&(buf->x), p, sizeof(INT16)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:138: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(&(buf->y), p, sizeof(INT16)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:190: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(&list_number, p, sizeof(INT32)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:198: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(hotkeys, p, list_number * sizeof(XIMTriggerKey)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:471: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(nest_list->value, values, value_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:522:21: [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(attr_ret[n].name, xic_attr[j].name, size); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:541:17: [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(attr_ret[n].name, xic_attr[j].name, size); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:207:17: [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(address->input_styles.supported_styles, data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:225:17: [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(address->on_keys.keylist, data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:240:17: [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(address->off_keys.keylist, data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:257:17: [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(address->encoding_list.supported_encodings, data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:604: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[LOCALES_BUFSIZE + 32]; data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:371:13: [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(ext_list[i].name, im_ext[i].name, size); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:386:21: [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(ext_list[n].name, im_ext[i].name, size); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:597:13: [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(buf, data, total_size); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:1057: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(&wire_event, p, sizeof(xEvent)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nUtil.c:155: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(reply, reply_hdr, header_size); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nUtil.c:157: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(replyp, data, length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:119:9: [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(p1, &major_opcode, sizeof(CARD8)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:121:9: [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(p1, &minor_opcode, sizeof(CARD8)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:123:9: [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(p1, &length, sizeof(CARD16)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:125:9: [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(p1, rec, length * 4); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:165:9: [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(p, prop, length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:253:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(atomName, data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:279: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 atomName[16]; data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:320:18: [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. unsigned char buffer[XCM_DATA_LIMIT]; data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:326:9: [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(buffer, reply, length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nX.c:331:9: [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(event.xclient.data.b, buffer, length); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:116:8: [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. static char strLocale[LOCALES_BUFSIZE + 1] = LOCALES_STRING; data/fcitx-4.2.9.8/src/frontend/xim/xim.c:222:13: [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(strLocale + strlen(LOCALES_STRING) + 1, p, p_l + 1); data/fcitx-4.2.9.8/src/frontend/xim/ximhandler.c:192: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 strbuf[STRBUFLEN]; data/fcitx-4.2.9.8/src/frontend/xim/ximhandler.c:280: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(&(forwardEvent->event), xEvent, sizeof(XEvent)); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:147:9: [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(keyboard->tempBuffer, &surrounding[cursor], len); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:345:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:557: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(keyboard->buffer[0], str, len); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:608:13: [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(keyboard->buffer[1], keyboard->buffer[0], data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:684:17: [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[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:748:17: [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[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:761: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 buf[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:776: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 str[strlen(commit) + 2]; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:805: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(FcitxInputStateGetRawInputBuffer(input), data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:2737: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 buffer[UTF8_MAX_LENGTH + 1] = {'\0', '\0', '\0', '\0', '\0', '\0', '\0'}; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.h:55: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 dictLang[6]; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.h:60: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[2][FCITX_KEYBOARD_MAX_BUFFER + UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/PYFA.h:30: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 strMap[3]; data/fcitx-4.2.9.8/src/im/pinyin/PYFA.h:34: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 strMap[3]; data/fcitx-4.2.9.8/src/im/pinyin/PYFA.h:57: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 strPY[7]; data/fcitx-4.2.9.8/src/im/pinyin/PYFA.h:62: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 strPY[7]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:202: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(pyconfig->SPMap_S, SPMap_S_Ziranma, sizeof(SPMap_S_Ziranma)); data/fcitx-4.2.9.8/src/im/pinyin/py.c:203: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(pyconfig->SPMap_C, SPMap_C_Ziranma, sizeof(SPMap_C_Ziranma)); data/fcitx-4.2.9.8/src/im/pinyin/py.c:260: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 strBase[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:363:25: [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(&PYFAList[i].pyBase[j].phrase[orig], &phrase[m], sizeof(PyPhrase)); data/fcitx-4.2.9.8/src/im/pinyin/py.c:600:17: [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 strTemp[MAX_USER_INPUT + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:665:21: [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 strTemp[MAX_USER_INPUT + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1014: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 str[3]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1019: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 strMap[MAX_WORDS_USER_INPUT * 2 + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1180: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 strHZString[MAX_WORDS_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1303: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 str[3]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1305: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 strMap[MAX_WORDS_USER_INPUT * 2 + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1401: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 str[MAX_WORDS_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1425: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 str[3]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1543: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 str[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:1665:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1728:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1791:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2093: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 str_PY[MAX_PY_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:2248: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 strQP[MAX_PY_LENGTH + 1] = ""; data/fcitx-4.2.9.8/src/im/pinyin/py.c:2279: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 singleHZ[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.c:2280: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 strMap[3]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:58: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 strHZ[MAX_PY_PHRASE_LENGTH * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:67: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 strPY[MAX_PY_PHRASE_LENGTH * MAX_PY_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:87: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 strHZ[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:97: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 strMap[3]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:150: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 strPY[(MAX_PY_LENGTH + 1) * MAX_PY_PHRASE_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:151: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 strHZ[MAX_PY_PHRASE_LENGTH * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:152: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 strMap[MAX_PY_PHRASE_LENGTH * 2 + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:168: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 strFindString[MAX_USER_INPUT + 2]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:172: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 strPYRemindSource[MAX_WORDS_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:173: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 strPYRemindMap[MAX_WORDS_USER_INPUT * 2 + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:178: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 strPYAuto[MAX_WORDS_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/py.h:179: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 strPYAutoMap[MAX_WORDS_USER_INPUT * 2 + 1]; data/fcitx-4.2.9.8/src/im/pinyin/pyMapTable.h:24: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 strPY[5]; data/fcitx-4.2.9.8/src/im/pinyin/pyMapTable.h:29: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 strPY[4]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:109: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 str_Map[3]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:110: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 strTemp[7]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:117: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 strQP[7]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:118: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 strJP[3]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:329:69: [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. boolean MapPY(FcitxPinyinConfig* pyconfig, const char* strPYorigin, char strMap[3], PYPARSEINPUTMODE mode) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:331: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 str[5]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:332: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 strPY[7]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:346:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(strMap, "X0"); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:405:17: [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. boolean MapToPY(char strMap[3], char *strPY) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:487:42: [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. int Cmp2Map(FcitxPinyinConfig* pyconfig, char map1[3], char map2[3], boolean bSP) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:487:56: [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. int Cmp2Map(FcitxPinyinConfig* pyconfig, char map1[3], char map2[3], boolean bSP) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:538: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 py[MAX_PY_LENGTH * 2 + 2]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h:44: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 strPYParsed[MAX_WORDS_USER_INPUT + 3][MAX_PY_LENGTH + 2]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h:45: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 strMap[MAX_WORDS_USER_INPUT + 3][3]; data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h:56:85: [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. boolean MapPY(struct _FcitxPinyinConfig* pyconfig, const char* strPYorigin, char strMap[3], PYPARSEINPUTMODE mode); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h:57:25: [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. boolean MapToPY(char strMap[3], char *strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h:61:62: [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. int Cmp2Map(struct _FcitxPinyinConfig* pyconfig, char map1[3], char map2[3], boolean bSP); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.h:61:76: [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. int Cmp2Map(struct _FcitxPinyinConfig* pyconfig, char map1[3], char map2[3], boolean bSP); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:49: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 str[100], strS[5], *pstr; data/fcitx-4.2.9.8/src/im/pinyin/sp.c:176:9: [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(pyconfig->SPMap_S, SPMap_S_source, 4 * sizeof(SP_S)); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:177:9: [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(pyconfig->SPMap_C, SPMap_C_source, 31 * sizeof(SP_C)); data/fcitx-4.2.9.8/src/im/pinyin/sp.c:209: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 strTmp[2]; data/fcitx-4.2.9.8/src/im/pinyin/sp.c:210: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 str_QP[MAX_PY_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/pinyin/sp.h:32: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 strQP[5]; data/fcitx-4.2.9.8/src/im/pinyin/sp.h:37: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 strQP[3]; data/fcitx-4.2.9.8/src/im/qw/qw.c:40: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 strQWHZ[3]; data/fcitx-4.2.9.8/src/im/qw/qw.c:41: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 strQWHZUTF8[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/table/table.c:420:17: [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[len + 2]; data/fcitx-4.2.9.8/src/im/table/table.c:421:17: [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(buf, strCodeInput, len); data/fcitx-4.2.9.8/src/im/table/table.c:608:13: [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 strPY[128]; data/fcitx-4.2.9.8/src/im/table/table.c:631:25: [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(strPY + offset, ", ", 2); data/fcitx-4.2.9.8/src/im/table/table.c:1050:21: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(candWord.strExtra, "\xef\xbd\x9e"); data/fcitx-4.2.9.8/src/im/table/table.c:1056:25: [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 temp[2] = {pstr[i], '\0'}; data/fcitx-4.2.9.8/src/im/table/table.c:1367: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 strTemp[PHRASE_MAX_LENGTH * UTF8_MAX_LENGTH + 1] = "", *ps; data/fcitx-4.2.9.8/src/im/table/table.h:67: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 strTableRemindSource[PHRASE_MAX_LENGTH * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/table/tabledict.c:29: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 strCode[MAX_CODE_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/table/tabledict.c:57:22: [2] (misc) fopen: 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). fpDict = fopen(tablepath, "r"); data/fcitx-4.2.9.8/src/im/table/tabledict.c:365:10: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/im/table/tabledict.c:475:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/im/table/tabledict.c:542: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 strTemp[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/table/tabledict.c:636: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 strTemp[UTF8_MAX_LENGTH + 1] = {'\0', }; data/fcitx-4.2.9.8/src/im/table/tabledict.h:37: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 strFH[FH_MAX_LENGTH * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/im/table/tabledict.h:76: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 strHZ[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:73:16: [2] (misc) fopen: 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). FILE* fp = fopen(filename, "r"); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:92:17: [2] (misc) fopen: 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). fp[i] = fopen(filename[i], "r"); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:202:16: [2] (misc) fopen: 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). FILE* fp = fopen(filename, "r"); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:305:63: [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). codesc2->constrain.integerConstrain.min = atoi(coption->rawValue); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:313:63: [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). codesc2->constrain.integerConstrain.max = atoi(coption->rawValue); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:329:68: [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). codesc2->constrain.stringConstrain.maxLength = atoi(coption->rawValue); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:360:34: [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 ecount = atoi(eoption->rawValue); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:363:25: [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 enumname[FCITX_INT_LEN + strlen("Enum") + 1]; data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:364:25: [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(enumname, "Enum", strlen("Enum")); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:369:29: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(enumname + strlen("Enum"), "%d", i); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:434:21: [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 value = atoi(option->rawValue); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:638: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[40]; data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:851:16: [2] (misc) fopen: 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). FILE* fp = fopen(filename, "r"); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:1007:16: [2] (misc) fopen: 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). FILE* fp = fopen(filename, "w"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:656:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "Ctrl+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:661:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "Alt+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:666:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "Shift+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:671:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "Super+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:718:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "CTRL_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:721:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "ALT_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:724:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "SHIFT_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:727:9: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(str, "SUPER_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:62: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 opath[len + 1]; data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:63: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(opath, path, len + 1); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:164:14: [2] (misc) fopen: 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). fp = fopen(fileName, mode); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:188:14: [2] (misc) fopen: 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). fp = fopen(buf, mode); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:203:18: [2] (misc) fopen: 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). fp = fopen(buf, mode); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:231: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 cwd[1024]; data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:358:13: [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 path_buf[nameLen + len1 + 2]; data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxclient.c:59: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 servicename[64]; data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxconnection.c:44: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 servicename[64]; data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxconnection.c:440:16: [2] (misc) fopen: 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). FILE *fp = fopen(path, "r"); data/fcitx-4.2.9.8/src/lib/fcitx-gclient/fcitxconnection.c:448: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[BUFSIZE]; data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection.cpp:195:33: [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). displayNumber = atoi(strDisplayNumber); data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection.cpp:239: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 (!file.open(QIODevice::ReadOnly)) data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection.cpp:244: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[BUFSIZE]; data/fcitx-4.2.9.8/src/lib/fcitx-utils/bitset.h:65: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(dst->data, src->data, fcitx_bitset_datasize(dst->size)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:352: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(new_group->name, name, name_len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:385: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(new_entry->name, name, name_len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:629:16: [2] (misc) fopen: 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). FILE *fp = fopen(name, "r"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:758:16: [2] (misc) fopen: 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). FILE *fp = fopen(name, "w"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.c:57:9: [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(&table->key_vtable, key_vtable, data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.c:81: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(key_ptr, key, keysize); data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.c:106: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(obj_struct + 1, obj, table->obj_size); data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.c:138: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(obj_struct + 1, obj, table->obj_size); data/fcitx-4.2.9.8/src/lib/fcitx-utils/msort_r.c:62:13: [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(tmp, b_a, s); data/fcitx-4.2.9.8/src/lib/fcitx-utils/msort_r.c:66:13: [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(tmp, b_b, s); data/fcitx-4.2.9.8/src/lib/fcitx-utils/msort_r.c:74:9: [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(tmp, b_a, n_a * s); data/fcitx-4.2.9.8/src/lib/fcitx-utils/msort_r.c:76: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(b, t, (n - n_b) * s); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:116:9: [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(p, item2->key, strl); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:122:13: [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(p, "true", strlen("true")); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:125:13: [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(p, "false", strlen("false")); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:114:13: [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(_utarray_eltptr(a, (a)->i++), p, (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:150:13: [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(_utarray_eltptr(a, 0), p, (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:166:13: [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(_utarray_eltptr(a, j), p, (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:180:13: [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(_temp, _utarray_eltptr(a, f), (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:183:13: [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(_utarray_eltptr(a, t), _temp, (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:185:13: [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(_temp, _utarray_eltptr(a, f), (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:188:13: [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(_utarray_eltptr(a, t), _temp, (a)->icd->sz); \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:211:13: [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(_utarray_eltptr(a, j), _utarray_eltptr(w, 0), \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:263:13: [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(_utarray_eltptr(a, pos), _utarray_eltptr(a, (a)->i - 1), \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:276:13: [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(_utarray_eltptr(a, pos), _utarray_eltptr(a, (a)->i - 1), \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utarray.h:380:9: [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(_utarray_eltptr(to, 0), _utarray_eltptr(from, 0), data/fcitx-4.2.9.8/src/lib/fcitx-utils/utf8.c:276:29: [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. if ((((unsigned char *)p)[i] & 0xc0) != 0x80) data/fcitx-4.2.9.8/src/lib/fcitx-utils/utf8.c:284:38: [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. unsigned int ch = ((unsigned char *)p)[i]; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utf8.c:349:9: [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(str, s, diff); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:211: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 delm_s[2] = {delm, '\0'}; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:252:9: [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(p, *str, strl); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:300:9: [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(p, string2->name, strl); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:318: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 delim_s[2] = {delim, '\0'}; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:411: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(result, s, len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:429:25: [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 displayNumber = atoi(str_disp_num); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:480: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 name[_PR_GET_NAME_MAX + 1]; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:814:9: [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(out, str_list[i], size_list[i]); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:832:13: [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(out, str_list[i], limit - out); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:836:9: [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(out, str_list[i], size_list[i]); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:879: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(res, str, len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:937:9: [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(dest, src, len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:945:9: [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(dest, src, len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:983:9: [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(dest, src, len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:992:9: [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(dest, src, len); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:344:9: [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(((char*)res) + base_size, extra_data, extra_size); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:731: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 dest[len]; \ data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:915:9: [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(&new_val, &__fx_byte_cast_old, \ data/fcitx-4.2.9.8/src/lib/fcitx/addon.c:118: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 *paths[len]; data/fcitx-4.2.9.8/src/lib/fcitx/candidate-internal.h:28: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 strChoose[MAX_CAND_WORD + 1]; data/fcitx-4.2.9.8/src/lib/fcitx/ime-internal.h:56: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 strCodeInput[MAX_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/lib/fcitx/ime-internal.h:57: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 strStringGet[MAX_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/lib/fcitx/ime-internal.h:58: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 strLastCommit[MAX_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:551: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(group1, origin, sizeof(FcitxHotkey[2])); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:557: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(group2, origin, sizeof(FcitxHotkey[2])); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:673:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(FcitxInputStateGetOutputString(input), "\xe3\x80\x80"); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:1024: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 str[2] = {FcitxInputStateGetRawInputBuffer(input)[0], '\0'}; data/fcitx-4.2.9.8/src/lib/fcitx/ime.h:277: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 langCode[LANGCODE_LENGTH + 1]; data/fcitx-4.2.9.8/src/lib/fcitx/instance.c:632: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). overrideDelay = atoi(optarg); data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:102:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int fd = mkstemp(tempfile); data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:139:15: [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. const char *names[count]; data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:56: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 strMsg[MESSAGE_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:843: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 strTemp[3] = { '\0', '\0', '\0' }; data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:888: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 *message_strs[count]; data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:911: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 *message_strs[count]; data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:943: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 strTemp[3] = { '\0', '\0', '\0' }; data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:963: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 strTemp[3] = { '\0', '\0', '\0' }; data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c:185:9: [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(autoEngState->buf, str, len); data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.h:36: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 str[MAX_AUTO_TO_ENG + 1]; data/fcitx-4.2.9.8/src/module/chttrans/chttrans_p.h:12: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 str[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:295: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(p, begin, begin_len); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:297: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(p, CLIPBOARD_CAND_SEP, strlen(CLIPBOARD_CAND_SEP)); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:299: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(p, end_begin, end_len); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:499: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(clipboard->primary.str, str, len); data/fcitx-4.2.9.8/src/module/dbus/dbuslauncher.c:54: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 buffer[BUFSIZE]; data/fcitx-4.2.9.8/src/module/dbus/dbusremote.c:39:16: [2] (misc) fopen: 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). FILE* fp = fopen(path, "r"); data/fcitx-4.2.9.8/src/module/dbus/dbusremote.c:47: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[BUFSIZE]; data/fcitx-4.2.9.8/src/module/dbus/dbusstuff.c:124: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(name, key, len); data/fcitx-4.2.9.8/src/module/dbus/dbusstuff.c:146: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(name, key, len); data/fcitx-4.2.9.8/src/module/dbus/watcher.c:56:17: [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). pid_t pid = atoi(argv[2]); data/fcitx-4.2.9.8/src/module/freedesktop-notify/freedesktop-notify.c:594: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 tip_id[0]; data/fcitx-4.2.9.8/src/module/lua/luawrap.c:724: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 key[3]; data/fcitx-4.2.9.8/src/module/notificationitem/dbusmenu.c:334: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 typeString[2] = {(char)type, '\0'}; data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem_p.h:43: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 layoutNameBuffer[3]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:67: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(pyenhance->cfp_mode_selected + len, cand_word->strWord, len2 + 1); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:196: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 buff[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:330:9: [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(pyenhance->cfp_mode_selected + len, cur_full, len2 + 1); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:359: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 *buff[len / 2]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:360: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 full[len + 1]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:401: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 **lists[size]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:423: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(pyenhance->cfp_mode_lists, lists, sizeof(char**) * n); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-map.c:47: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(py_enhance_map_word(py_word), word, word_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-map.c:56:9: [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(py_enhance_map_key(py_map), key, key_l + 1); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c:338: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(buff, k_s, k_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c:339: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(buff + k_l, v_s, v_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c:358: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(*py_list, word, word_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c:364: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(tmp + 1, py_buff, py_size); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c:403:10: [2] (misc) fopen: 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). fp = fopen(fname, "r"); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-py.c:408: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 buff[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.c:115:9: [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(key->key, key_s, key_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.c:127: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(word->word, word_s, word_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.c:610:13: [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(stroke + 3, key->key, key->key_l); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.c:669:9: [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(str + accum_len, buff[i]->str, buff[i]->len); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-stroke.h:30: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 word[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:58:14: [2] (misc) fopen: 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). fp = fopen(fname, "r"); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:116:11: [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. const char prob[2] = {str[0]}; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:160: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 buff[64]; data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:164: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(res, " (", 2); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:173:9: [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(res + len, buff, py_len); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:175:9: [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(res + len, ", ", 2); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:178: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(res + len - 2, ")", 2); data/fcitx-4.2.9.8/src/module/punc/punc.c:55: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 strWidePunc[MAX_PUNC_NO][MAX_PUNC_LENGTH * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/punc/punc.c:178: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(which->bitset, whichsrc->bitset, fcitx_bitset_size(256)); data/fcitx-4.2.9.8/src/module/punc/punc.c:339:17: [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[2] = { sym, 0 }; data/fcitx-4.2.9.8/src/module/punc/punc.c:401: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 strText[4 + MAX_PUNC_LENGTH * UTF8_MAX_LENGTH]; data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:84: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[MAX_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:220:58: [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. void QuickPhraseFillKeyString(QuickPhraseState* qpstate, char c[2]) data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:237: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 c[2]; data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:371: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 c[2]; data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:395: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 c[2]; data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:411:13: [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[2]; data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:595: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 c[2]; data/fcitx-4.2.9.8/src/module/remote/remote.c:178: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 imname[MAX_IMNAME_LEN]; data/fcitx-4.2.9.8/src/module/spell/dict/comp_spell_dict.c:88: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). ifd = open(argv[2], O_RDONLY); data/fcitx-4.2.9.8/src/module/spell/dict/comp_spell_dict.c:89: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). ofd = open(argv[3], O_WRONLY | O_TRUNC | O_CREAT, 0644); data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:201:10: [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). fd = open(fname, O_RDONLY); data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:213: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 magic_buff[strlen(DICT_BIN_MAGIC)]; data/fcitx-4.2.9.8/src/module/spell/spell-presage.c:107: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 *commits[len]; data/fcitx-4.2.9.8/src/module/spell/spell-presage.c:108: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 *displays[len]; data/fcitx-4.2.9.8/src/module/spell/spell-presage.c:160: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 buf[(int)(sizeof(unsigned int) * 5.545177444479562) + 1]; data/fcitx-4.2.9.8/src/module/spell/spell-presage.c:161:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u", len_limit); data/fcitx-4.2.9.8/src/module/spell/spell.c:244:9: [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(p, GET_NTH(displays, i, sized), lens[0][i]); data/fcitx-4.2.9.8/src/module/spell/spell.c:251:9: [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(p, GET_NTH(commits, i, sizec), lens[1][i]); data/fcitx-4.2.9.8/src/module/spell/spell.c:282:13: [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(p, prefix, prefix_len); data/fcitx-4.2.9.8/src/module/spell/spell.c:286:9: [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(p, GET_NTH(commits, i, sizec), lens[i]); data/fcitx-4.2.9.8/src/module/spell/spell.c:504: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(args + 1, commit, len); data/fcitx-4.2.9.8/src/module/unicode/unicode.c:36: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[MAX_USER_INPUT * UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/src/module/unicode/unicode.c:182:13: [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[2]; data/fcitx-4.2.9.8/src/module/vk/vk.c:67: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 strSymbol[VK_NUMBERS][2][UTF8_MAX_LENGTH + 1]; //相应的符号 data/fcitx-4.2.9.8/src/module/vk/vk.c:95:7: [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. const char vkTable[VK_NUMBERS + 1] = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./"; data/fcitx-4.2.9.8/src/module/vk/vk.c:445: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 strKey[3] = { 0, 0, 0}; data/fcitx-4.2.9.8/src/module/x11/x11stuff.c:283: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 atom_name[sizeof(CMPMGR_PREFIX) + FCITX_INT64_LEN] = CMPMGR_PREFIX; data/fcitx-4.2.9.8/src/module/x11/x11stuff.c:284:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(atom_name + strlen(CMPMGR_PREFIX), "%d", x11priv->iScreen); data/fcitx-4.2.9.8/src/module/x11/xerrorhandler.c:76: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 str[256]; data/fcitx-4.2.9.8/src/module/xkb/rules.c:108: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 extrafile[extra_len + strlen(".extras.xml") + 1]; data/fcitx-4.2.9.8/src/module/xkb/rules.c:109:9: [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(extrafile, file, extra_len); data/fcitx-4.2.9.8/src/module/xkb/rules.c:110:9: [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(extrafile + extra_len, ".extras.xml", sizeof(".extras.xml")); data/fcitx-4.2.9.8/src/ui/cairostuff/font.c:49: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 locale[3]; data/fcitx-4.2.9.8/src/ui/cairostuff/font.c:54:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(locale, "zh"); data/fcitx-4.2.9.8/src/ui/classic/InputWindow.c:156:21: [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 strTemp[MESSAGE_MAX_LENGTH]; data/fcitx-4.2.9.8/src/ui/classic/InputWindow.h:63: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 *strUp[MAX_MESSAGE_COUNT]; data/fcitx-4.2.9.8/src/ui/classic/InputWindow.h:64: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 *strDown[MAX_MESSAGE_COUNT]; data/fcitx-4.2.9.8/src/ui/classic/skin.c:97:14: [2] (misc) fopen: 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). fp = fopen(path, "r"); data/fcitx-4.2.9.8/src/ui/classic/skin.c:766: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 temp[LANGCODE_LENGTH + 1] = { '\0', }; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:251: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 temp[LANGCODE_LENGTH + 1] = { '\0', }; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:581: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 *label[33]; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:582: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 *text[33]; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:583: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 cmb[KIMPANEL_BUFFER_SIZE] = ""; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:656: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 aux[MESSAGE_MAX_LENGTH] = ""; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:657: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 empty[MESSAGE_MAX_LENGTH] = ""; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:781:21: [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 *prop[2]; data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:843:29: [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 *prop[len]; data/fcitx-4.2.9.8/test/testcast.c:8: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 str[3]; data/fcitx-4.2.9.8/test/teststring.c:32: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 localcat[20]; data/fcitx-4.2.9.8/test/teststring.c:37: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 localcat2[6]; data/fcitx-4.2.9.8/test/testunicode.c:14:20: [2] (misc) fopen: 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). FILE* fp = fopen(f, "r"); data/fcitx-4.2.9.8/test/testutf8.c:10: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[BUF_SIZE]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:34: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 strPY[3]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:35: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 strHZ[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:49: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 strHZ[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:57: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 strMap[3]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:77:10: [2] (misc) fopen: 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). fp = fopen("pybase.mb", "r"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:123:10: [2] (misc) fopen: 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). fp = fopen("pybase.mb", "w"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:149: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 strPY[256]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:150: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 strPhrase[256]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:151: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 strMap[256]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:155:25: [2] (misc) fopen: 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). FILE *f = fopen("pyERROR", "w"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:156:26: [2] (misc) fopen: 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). FILE *fg = fopen("pyPhrase.ok", "w"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:276: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 strPY[7], strHZ[UTF8_MAX_LENGTH * 80 + 1], strMap[3]; data/fcitx-4.2.9.8/tools/cli/createPYMB.c:402:11: [2] (misc) fopen: 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). fps = fopen(argv[1], "r"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:403:11: [2] (misc) fopen: 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). fpt = fopen(argv[2], "r"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:404:11: [2] (misc) fopen: 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). fp1 = fopen("pybase.mb", "w"); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:405:11: [2] (misc) fopen: 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). fp2 = fopen("pyphrase.mb", "w"); data/fcitx-4.2.9.8/tools/cli/mb2org.c:78:14: [2] (misc) fopen: 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). fi = fopen(pyusrphrase_mb , "r"); data/fcitx-4.2.9.8/tools/cli/mb2org.c:89:15: [2] (misc) fopen: 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). fi2 = fopen(pybase_mb , "r"); data/fcitx-4.2.9.8/tools/cli/mb2org.c:109:17: [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(tMap, PYMB[i].UserPhrase[j].Map + 2 * k, 2); data/fcitx-4.2.9.8/tools/cli/mb2org.c:114:21: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(tPY, "'*"); data/fcitx-4.2.9.8/tools/cli/mb2org.c:136: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 Map[3], tPY[10]; data/fcitx-4.2.9.8/tools/cli/mb2txt.c:108: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 strCode[100]; data/fcitx-4.2.9.8/tools/cli/mb2txt.c:109: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 strHZ[UTF8_MAX_LENGTH * 31]; data/fcitx-4.2.9.8/tools/cli/mb2txt.c:140:14: [2] (misc) fopen: 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). fpDict = fopen(argv[optind], "r"); data/fcitx-4.2.9.8/tools/cli/pyTools.c:135:37: [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. HZMap[i].HZ = malloc(sizeof(char *) * HZMap[i].BaseCount); data/fcitx-4.2.9.8/tools/cli/pyTools.h:32: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 HZ[UTF8_MAX_LENGTH + 1]; data/fcitx-4.2.9.8/tools/cli/pyTools.h:45: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 Map[3]; data/fcitx-4.2.9.8/tools/cli/readPYBase.c:55:14: [2] (misc) fopen: 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). fi = fopen(pybase_mb , "r"); data/fcitx-4.2.9.8/tools/cli/readPYMB.c:61:14: [2] (misc) fopen: 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). fi = fopen(pyusrphrase_mb, "r"); data/fcitx-4.2.9.8/tools/cli/scel2org.c:41:1: [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 header_str[HEADER_SIZE] = { '\x40', '\x15', '\0', '\0', '\x44', '\x43', '\x53' , '\x01' , '\x01', '\0', '\0', '\0'}; data/fcitx-4.2.9.8/tools/cli/scel2org.c:42:1: [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 pinyin_str[PINYIN_SIZE] = { '\x9d', '\x01', '\0', '\0' }; data/fcitx-4.2.9.8/tools/cli/scel2org.c:46: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 pinyin[10]; data/fcitx-4.2.9.8/tools/cli/scel2org.c:83:20: [2] (misc) fopen: 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). fout = fopen(optarg, "w"); data/fcitx-4.2.9.8/tools/cli/scel2org.c:106:16: [2] (misc) fopen: 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). FILE *fp = fopen(argv[optind], "r"); data/fcitx-4.2.9.8/tools/cli/scel2org.c:112: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[BUFLEN], bufout[BUFLEN]; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:60:1: [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 strInputCode[100] = "\0"; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:61:1: [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 strIgnoreChars[100] = "\0"; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:102: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 strTemp[10]; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:117:14: [2] (misc) fopen: 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). fpDict = fopen(argv[1], "r"); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:158:27: [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). iCodeLength = atoi(pstr); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:190: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). iPYCodeLength = atoi(pstr); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:272:34: [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). rule[iTemp].iWords = atoi(strTemp); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:488:13: [2] (misc) fopen: 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). fpNew = fopen(argv[2], "w"); data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:113:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(res + len, "___"); data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:197: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 in_buff[ENCODE_BUF_SIZE]; data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:198: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 out_buff[ENCODE_BUF_SIZE * 2]; data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:228:15: [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. static inline char data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:229:19: [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. hex_to_char(const char c[2]) data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:238: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 out_buff[DECODE_BUF_SIZE]; data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:239: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 in_buff[DECODE_BUF_SIZE * 2]; data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:303:9: [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(buff.buff, prefix, prefix_len); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:304:37: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. size_t p_len = prefix_len + sprintf(buff.buff + prefix_len, "%d", i); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:613: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(buff->buff + prefix_l, ".Deref", sizeof(".Deref")); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:615: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(buff->buff + prefix_l, ".DerefType", sizeof(".DerefType")); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:619: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(buff->buff + prefix_l, ".Preconv", sizeof(".Preconv")); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:621: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(buff->buff + prefix_l, ".PreconvType", sizeof(".PreconvType")); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:1224: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(buff.buff, addon_desc->name, addon_desc->name_len + 1); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:1323:17: [2] (misc) fopen: 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). FILE *ifp = fopen(argv[2], "r"); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:1328:17: [2] (misc) fopen: 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). FILE *ofp = fopen(argv[3], "w"); data/fcitx-4.2.9.8/src/core/errorhandler.c:127:32: [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). _write_string_len(fd, str, strlen(str)); data/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:719: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:735: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:744: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:805: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:809: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:1109: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/fcitx-4.2.9.8/src/frontend/gtk2/fcitximcontext.c:1225: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); data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c:428:17: [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(appname) == 0) { data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c:460:17: [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(appname) == 0) { data/fcitx-4.2.9.8/src/frontend/ipc/ipc.c:1128:27: [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 copylen = strlen(end); data/fcitx-4.2.9.8/src/frontend/ipcportal/ipcportal.c:751:27: [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 copylen = strlen(end); data/fcitx-4.2.9.8/src/frontend/qt/fcitxwatcher.cpp:168:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t sz = file.read(buffer, BUFSIZE); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:106: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). int size = strlen((char*)pre_attr->value); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:143: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). int size = strlen((char*)sts_attr->value) + 1; data/fcitx-4.2.9.8/src/frontend/xim/IC.c:284:49: [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). CARD16 base_len = (CARD16) strlen(rec->pre_attr.base_font); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:292:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, rec->pre_attr.base_font, base_len); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:325:49: [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). CARD16 base_len = (CARD16) strlen(rec->sts_attr.base_font); data/fcitx-4.2.9.8/src/frontend/xim/IC.c:333:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p, rec->sts_attr.base_font, base_len); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nAttr.c:112: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). p->length = strlen(attr->name); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nAttr.c:163:28: [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). ext_list->length = strlen(ext_list->name); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nIc.c:105:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, base_name, base_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:619: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). strlen(buf)); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:824:22: [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). str_length = strlen(call_data->commit_string); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nMethod.c:852:22: [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). str_length = strlen(call_data->commit_string); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:180:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(imopen->lang.name, name, str_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:208:20: [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). str_size = strlen(i18n_core->address.xim_attr[i].name); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:216:20: [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). str_size = strlen(i18n_core->address.xic_attr[i].name); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:440:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(query_ext->extension[number].name, name, str_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:477:20: [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). str_size = strlen(ext_list[i].name); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:1342:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(enc_nego->encoding[i].name, name, str_length); data/fcitx-4.2.9.8/src/frontend/xim/lib/i18nPtHdr.c:1365:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(enc_nego->encodinginfo[i].name, name, str_length); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:154: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). if (!strncmp(imname, "@im=", strlen("@im="))) { data/fcitx-4.2.9.8/src/frontend/xim/xim.c:219: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). int p_l = strlen(p); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:220: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(LOCALES_STRING) + p_l + 1 < LOCALES_BUFSIZE) { data/fcitx-4.2.9.8/src/frontend/xim/xim.c:221:23: [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). strLocale[strlen(LOCALES_STRING)] = ','; data/fcitx-4.2.9.8/src/frontend/xim/xim.c:222:32: [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). memcpy(strLocale + strlen(LOCALES_STRING) + 1, p, p_l + 1); data/fcitx-4.2.9.8/src/frontend/xim/xim.c:453: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(strPreedit) == 0 && GetXimIC(ic)->bPreeditStarted == true) { data/fcitx-4.2.9.8/src/frontend/xim/xim.c:459: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(strPreedit) != 0 && GetXimIC(ic)->bPreeditStarted == false) { data/fcitx-4.2.9.8/src/frontend/xim/xim.c:463: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(strPreedit) != 0) { data/fcitx-4.2.9.8/src/frontend/xim/ximhandler.c:366:20: [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). text->length = strlen((char*)tp.value); data/fcitx-4.2.9.8/src/im/keyboard/isocodes.c:109: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). HASH_ADD_KEYPTR(hh1, isocodes->iso6392B, e->iso_639_2B_code, strlen(e->iso_639_2B_code), e); data/fcitx-4.2.9.8/src/im/keyboard/isocodes.c:110: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). HASH_ADD_KEYPTR(hh2, isocodes->iso6392T, e->iso_639_2T_code, strlen(e->iso_639_2T_code), e); data/fcitx-4.2.9.8/src/im/keyboard/isocodes.c:143: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). HASH_ADD_KEYPTR(hh, isocodes->iso3166, e->alpha_2_code, strlen(e->alpha_2_code), e); data/fcitx-4.2.9.8/src/im/keyboard/isocodes.c:149:43: [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). HASH_FIND(hh1,isocodes->iso6392B,lang,strlen(lang),entry); data/fcitx-4.2.9.8/src/im/keyboard/isocodes.c:151: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). HASH_FIND(hh2,isocodes->iso6392T,lang,strlen(lang),entry); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:98:28: [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 len = cursor + strlen(keyboard->buffer[0]) + 1; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:136:25: [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 surlen = strlen(surrounding); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:258:22: [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(lang); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:554: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). int len = strlen(str); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:664:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(keyboard->dictLang, currentLang, LANGCODE_LENGTH); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:691:34: [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 charlen = strlen(buf); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:693:30: [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(keyboard->buffer[0]); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:707:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(&keyboard->buffer[0][keyboard->cursorPos], data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:715:31: [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 slen = strlen(keyboard->buffer[0]); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:739: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(keyboard->buffer[0]) > 0) { data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:776:14: [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). char str[strlen(commit) + 2]; data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:779:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(str, " "); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:804: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). size_t bufferlen = strlen(keyboard->buffer[0]); data/fcitx-4.2.9.8/src/im/keyboard/keyboard.c:884:23: [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). strlen("fcitx-keyboard")) == 0) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:566:23: [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). val = i = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:602:23: [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). val = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:606:44: [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). pystate->iPYInsertPoint += strlen(pystate->strFindString) - val; data/fcitx-4.2.9.8/src/im/pinyin/py.c:617:51: [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). memmove(move_src - val, move_src, strlen(move_src) + 1); data/fcitx-4.2.9.8/src/im/pinyin/py.c:622:22: [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(pystate->strFindString)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:628:22: [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(pystate->strFindString)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:635:44: [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 (pystate->iPYInsertPoint == strlen(pystate->strFindString)) data/fcitx-4.2.9.8/src/im/pinyin/py.c:640: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). memmove(move_dst, move_dst + val, strlen(move_dst + val) + 1); data/fcitx-4.2.9.8/src/im/pinyin/py.c:644: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). if (!strlen(pystate->strFindString)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:653: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). pystate->iPYInsertPoint = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:656:44: [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 (pystate->iPYInsertPoint == strlen(pystate->strFindString)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:667:27: [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). val = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:671: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). pystate->iPYInsertPoint = strlen(pystate->strFindString) - val; data/fcitx-4.2.9.8/src/im/pinyin/py.c:694:13: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(outputString, ""); data/fcitx-4.2.9.8/src/im/pinyin/py.c:856:23: [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). iCursorPos += strlen(pystate->pySelected[i].strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:860:35: [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 (pystate->iPYInsertPoint > strlen(pystate->strFindString)) data/fcitx-4.2.9.8/src/im/pinyin/py.c:861:35: [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). pystate->iPYInsertPoint = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:865: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(pystate->findMap.strPYParsed[i]) >= iTemp) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:869:23: [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). iCursorPos += strlen(pystate->findMap.strPYParsed[i]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:872: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). iTemp -= strlen(pystate->findMap.strPYParsed[i]); data/fcitx-4.2.9.8/src/im/pinyin/py.c:895:49: [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). FcitxInputStateSetRawInputBufferSize(input, strlen(strCodeInput)); data/fcitx-4.2.9.8/src/im/pinyin/py.c:908:35: [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 (pystate->iPYInsertPoint > strlen(pystate->strFindString)) data/fcitx-4.2.9.8/src/im/pinyin/py.c:909:35: [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). pystate->iPYInsertPoint = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1057: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). if (!val || (val && (strlen(phrase->strMap) == iMatchedLength))) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1062:44: [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). } else if (strlen(phrase->strMap) <= (pystate->findMap.iHZCount - 1) * 2) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1063:41: [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(phrase->strMap) == strlen(phraseSelected->strMap)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1063:67: [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(phrase->strMap) == strlen(phraseSelected->strMap)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1072:48: [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). } else if (strlen(phrase->strMap) > strlen(phraseSelected->strMap)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1072:73: [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). } else if (strlen(phrase->strMap) > strlen(phraseSelected->strMap)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1095: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). if (!val || (val && (strlen(PYFAList[candPos.iPYFA].pyBase[candPos.iBase].phrase[candPos.iPhrase].strMap) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1101:44: [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). } else if (strlen(PYFAList[candPos.iPYFA].pyBase[candPos.iBase].phrase[candPos.iPhrase].strMap) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1103:41: [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(PYFAList[candPos.iPYFA].pyBase[candPos.iBase].phrase[candPos.iPhrase].strMap) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1104:48: [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). == strlen(phraseSelected->strMap)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1118:48: [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). } else if (strlen(PYFAList[candPos.iPYFA].pyBase[candPos.iBase].phrase[candPos.iPhrase].strMap) data/fcitx-4.2.9.8/src/im/pinyin/py.c:1119: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). > strlen(phraseSelected->strMap)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1294:31: [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). pystate->iPYInsertPoint = strlen(pystate->strFindString); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1330: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). if (!val || (val && (strlen(phrase->strMap) == iMatchedLength))) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1353:38: [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). (val && (strlen(PYFAList[candPos.iPYFA].pyBase[candPos.iBase].phrase[candPos.iPhrase].strMap) == iMatchedLength))) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:1558:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, phrase, clen); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1588:74: [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). newPhrase->phrase.strMap = (char*)fcitx_utils_malloc0(sizeof(char) * strlen(map + 2) + 1); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1589:77: [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). newPhrase->phrase.strPhrase = (char*)fcitx_utils_malloc0(sizeof(char) * strlen(phrase + clen) + 1); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1683: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). clen = strlen(PYFAList[i].pyBase[j].strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1689:29: [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). iTemp = strlen(phrase->strMap); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1693:29: [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). iTemp = strlen(phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:1753:25: [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). char slen = strlen(hz->strHZ); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2016:20: [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). } else if (strlen(pyBaseForRemind->phrase[i].strPhrase) == strlen(pystate->strPYRemindSource)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:2016:68: [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). } else if (strlen(pyBaseForRemind->phrase[i].strPhrase) == strlen(pystate->strPYRemindSource)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:2019:60: [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). pyBaseForRemind->phrase[i].strPhrase, strlen(pystate->strPYRemindSource + fcitx_utf8_char_len(pystate->strPYRemindSource))) data/fcitx-4.2.9.8/src/im/pinyin/py.c:2039:20: [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). } else if (strlen(phrase->strPhrase) == strlen(pystate->strPYRemindSource)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:2039:49: [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). } else if (strlen(phrase->strPhrase) == strlen(pystate->strPYRemindSource)) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:2042:41: [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). phrase->strPhrase, strlen(pystate->strPYRemindSource + fcitx_utf8_char_len(pystate->strPYRemindSource)))) { data/fcitx-4.2.9.8/src/im/pinyin/py.c:2087:34: [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). pyRemindCandWords->iLength = strlen(pystate->strPYRemindSource) - fcitx_utf8_char_len(pystate->strPYRemindSource); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2102:25: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(strPY, " "); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2198:20: [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). return strlen(canda->cand.phrase.phrase->strPhrase) - strlen(candb->cand.phrase.phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2198:67: [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). return strlen(canda->cand.phrase.phrase->strPhrase) - strlen(candb->cand.phrase.phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2201: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). int size = strlen(canda->cand.phrase.phrase->strPhrase) - strlen(candb->cand.phrase.phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2201:71: [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 size = strlen(canda->cand.phrase.phrase->strPhrase) - strlen(candb->cand.phrase.phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2212: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). int size = strlen(canda->cand.phrase.phrase->strPhrase) - strlen(candb->cand.phrase.phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2212:71: [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 size = strlen(canda->cand.phrase.phrase->strPhrase) - strlen(candb->cand.phrase.phrase->strPhrase); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2291:29: [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). hzCountLocal += strlen(pystate->pySelected[i].strMap) / 2; data/fcitx-4.2.9.8/src/im/pinyin/py.c:2305:48: [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). strHZ = fcitx_utf8_get_nth_char(strHZ, strlen(totalMap) / 2); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2314:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(singleHZ, strHZ, len); data/fcitx-4.2.9.8/src/im/pinyin/py.c:2323:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(totalMap, strMap, 2); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:46: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(strPY, syllabaryMapTable[i].strPY, strlen(syllabaryMapTable[i].strPY))) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:63: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(strPY, consonantMapTable[i].strPY, strlen(consonantMapTable[i].strPY))) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:82: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). cmp = strncmp(strPY, pyconfig->PYTable[i].strPY, strlen(pyconfig->PYTable[i].strPY)); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:166:33: [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 lIndex = strlen(pyconfig->PYTable[iIndex].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:176:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, strP, lIndex - 1); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:187:64: [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). iTemp = FindPYFAIndex(pyconfig, strP + strlen(pyconfig->PYTable[iTemp].strPY), 1); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:197:33: [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(pyconfig->PYTable[iTemp].strPY) == 1 || !strcmp("ng", pyconfig->PYTable[iTemp].strPY)) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:203:73: [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 index2 = FindPYFAIndex(pyconfig, strP + strlen(pyconfig->PYTable[iIndex].strPY), 1); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:213: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). size_t length1 = strlen(pyconfig->PYTable[iIndex].strPY) + strlen(pyconfig->PYTable[index2].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:213:92: [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 length1 = strlen(pyconfig->PYTable[iIndex].strPY) + strlen(pyconfig->PYTable[index2].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:214: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). size_t length2 = strlen(pyconfig->PYTable[firstIndex].strPY) + strlen(pyconfig->PYTable[iTemp].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:214:96: [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 length2 = strlen(pyconfig->PYTable[firstIndex].strPY) + strlen(pyconfig->PYTable[iTemp].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:227:33: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, strP, lIndex - 1); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:243:25: [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). strP += strlen(strTemp); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:275:29: [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). strP += strlen(consonantMapTable[iIndex].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:293:33: [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). strP += strlen(syllabaryMapTable[iIndex].strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:312: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). if (strPY[strlen(strPY) - 1] == PY_SEPARATOR && !bSP) data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:337:27: [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(strPY); data/fcitx-4.2.9.8/src/im/pinyin/pyParser.c:423:14: [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(strPY)) data/fcitx-4.2.9.8/src/im/pinyin/sp.c:40: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). #define cstrlen(b) (strlen(cstr(b))) data/fcitx-4.2.9.8/src/im/pinyin/sp.c:105:17: [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). i = strlen(str) - 1; data/fcitx-4.2.9.8/src/im/pinyin/sp.c:146:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strS, pstr, i); data/fcitx-4.2.9.8/src/im/table/table.c:142: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). return (strlen(table->uniqueName) == 0) ? data/fcitx-4.2.9.8/src/im/table/table.c:149: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). HASH_ADD_KEYPTR(hh, *tableSet, name, strlen(name), table); data/fcitx-4.2.9.8/src/im/table/table.c:196: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 (option && strlen(option->rawValue)) data/fcitx-4.2.9.8/src/im/table/table.c:418:31: [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 len1 = strlen(strCodeInput); data/fcitx-4.2.9.8/src/im/table/table.c:773:44: [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). FcitxInputStateSetCursorPos(input, strlen(FcitxInputStateGetRawInputBuffer(input))); data/fcitx-4.2.9.8/src/im/table/table.c:841:83: [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). strcpy(tbl->strTableRemindSource, tableCandWord->candWord.record->strHZ + strlen(tbl->strTableRemindSource)); data/fcitx-4.2.9.8/src/im/table/table.c:906:49: [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). FcitxInputStateSetRawInputBufferSize(input, strlen(FcitxInputStateGetRawInputBuffer(input))); data/fcitx-4.2.9.8/src/im/table/table.c:979:48: [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). FcitxInputStateSetCursorPos(input, strlen(FcitxInputStateGetRawInputBuffer(input))); data/fcitx-4.2.9.8/src/im/table/table.c:1037:34: [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 codelen = strlen(pstr); data/fcitx-4.2.9.8/src/im/table/table.c:1043:37: [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). totallen += strlen(rec->strHZ); data/fcitx-4.2.9.8/src/im/table/table.c:1117:44: [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). FcitxInputStateSetCursorPos(input, strlen(FcitxInputStateGetRawInputBuffer(input))); data/fcitx-4.2.9.8/src/im/table/table.c:1186: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 tmp_len = strlen(table->tableDict->strInputCode); data/fcitx-4.2.9.8/src/im/table/table.c:1277:83: [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). candWord.strWord = strdup(tableCandWord->candWord.record->strHZ + strlen(tbl->strTableRemindSource)); data/fcitx-4.2.9.8/src/im/table/table.c:1313:79: [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). strcpy(tbl->strTableRemindSource, tableCandWord->candWord.record->strHZ + strlen(tbl->strTableRemindSource)); data/fcitx-4.2.9.8/src/im/table/table.c:1427:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hzLastInput[j].strHZ, hzLastInput[j + 1].strHZ, data/fcitx-4.2.9.8/src/im/table/table.c:1432:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(hzLastInput[tableDict->iHZLastInputCount - 1].strHZ, data/fcitx-4.2.9.8/src/im/table/table.c:1459: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 lengthA = strlen(canda->candWord.record->strCode); data/fcitx-4.2.9.8/src/im/table/table.c:1460: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 lengthB = strlen(candb->candWord.record->strCode); data/fcitx-4.2.9.8/src/im/table/tabledict.c:89: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 tmp_len = strlen(tableDict->strInputCode) + 26; data/fcitx-4.2.9.8/src/im/table/tabledict.c:208:33: [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(strCode) > strlen(tableDict->tableSingleHZ[iTemp]->strCode)) data/fcitx-4.2.9.8/src/im/table/tabledict.c:208:51: [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(strCode) > strlen(tableDict->tableSingleHZ[iTemp]->strCode)) data/fcitx-4.2.9.8/src/im/table/tabledict.c:219:55: [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 (recTemp->type == RECORDTYPE_PROMPT && strlen(recTemp->strCode) == 1) data/fcitx-4.2.9.8/src/im/table/tabledict.c:387: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). iTemp = strlen(tableDict->strInputCode); data/fcitx-4.2.9.8/src/im/table/tabledict.c:398: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). iTemp = strlen(tableDict->strIgnoreChars); data/fcitx-4.2.9.8/src/im/table/tabledict.c:430:17: [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). iTemp = strlen(recTemp->strHZ) + 1; data/fcitx-4.2.9.8/src/im/table/tabledict.c:546:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, strHZ, fcitx_utf8_char_len(strHZ)); data/fcitx-4.2.9.8/src/im/table/tabledict.c:664:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, ps, clen); data/fcitx-4.2.9.8/src/im/table/tabledict.c:668:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, ps, clen); data/fcitx-4.2.9.8/src/im/table/tabledict.c:684: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(recTemp->strCode) >= tableDict->rule[i].rule[i1].iIndex) { data/fcitx-4.2.9.8/src/im/table/tabledict.c:735:86: [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). dictNew->strHZ = (char*)fcitx_memory_pool_alloc(tableDict->pool, sizeof(char) * (strlen(strHZ) + 1)); data/fcitx-4.2.9.8/src/im/table/tabledict.c:789:22: [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 tmp_len = strlen(strUser); data/fcitx-4.2.9.8/src/im/table/tabledict.c:799: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(strUser) != strlen(strDict)) data/fcitx-4.2.9.8/src/im/table/tabledict.c:799:32: [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(strUser) != strlen(strDict)) data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:163: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). HASH_ADD_KEYPTR(hh, cfile->groups, group->groupName, strlen(group->groupName), group); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:180:73: [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). HASH_ADD_KEYPTR(hh, group->options, option->optionName, strlen(option->optionName), option); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:252:38: [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). unsigned int optionNameLen = strlen(p + 1); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:363:55: [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). char enumname[FCITX_INT_LEN + strlen("Enum") + 1]; data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:364: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). memcpy(enumname, "Enum", strlen("Enum")); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:369:48: [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). sprintf(enumname + strlen("Enum"), "%d", i); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:587: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). && strlen(option->rawValue) > option->optionDesc2->constrain.stringConstrain.maxLength) data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:595: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). && strlen(*option->value.string) > option->optionDesc2->constrain.stringConstrain.maxLength) data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:645: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(locale); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:650:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, locale, len); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:887: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). lineLen = strlen(line); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:939:34: [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 namelen = strlen(name); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:965:81: [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). HASH_ADD_KEYPTR(hh, option->subkey, subkey->subkeyName, strlen(subkey->subkeyName), subkey); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:976:76: [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). HASH_ADD_KEYPTR(hh, curGroup->options, option->optionName, strlen(option->optionName), option); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:985:77: [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). HASH_ADD_KEYPTR(hh, option->subkey, subkey->subkeyName, strlen(subkey->subkeyName), subkey); data/fcitx-4.2.9.8/src/lib/fcitx-config/fcitx-config.c:1175:37: [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 (optiondesc->desc && strlen(optiondesc->desc) != 0) data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:624: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). len += strlen("Ctrl+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:629: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). len += strlen("Alt+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:634: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). len += strlen("Shift+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:639: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). len += strlen("Super+"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:649: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). size_t keylen = strlen(key); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:694: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). len += strlen("CTRL_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:697: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). len += strlen("ALT_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:700: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). len += strlen("SHIFT_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:703: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). len += strlen("SUPER_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:713:12: [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(key); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:748:14: [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). p += strlen("CTRL_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:753:14: [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). p += strlen("ALT_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:758:14: [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). p += strlen("SHIFT_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:763:14: [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). p += strlen("SUPER_"); data/fcitx-4.2.9.8/src/lib/fcitx-config/hotkey.c:795: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(strKey) == 1) data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:61: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(path); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:241: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). dh_len = strlen(dirHome); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:248:25: [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 he_len = strlen(env_home); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:249:25: [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 hd_len = strlen(homeDefault); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:258: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). size_t sh_len = strlen(suffixHome); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:261:25: [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 dd_len = strlen(dirsDefault); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:262:25: [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 sg_len = strlen(suffixGlobal); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:343:25: [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). suffixlen = strlen(suffix); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:345:25: [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). prefixlen = strlen(prefix); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:349:30: [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 nameLen = strlen(drt->d_name); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:357:27: [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 len1 = strlen(xdgPath[i]); data/fcitx-4.2.9.8/src/lib/fcitx-config/xdg.c:373:37: [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). strlen(string->name), string); data/fcitx-4.2.9.8/src/lib/fcitx-qt/fcitxqtconnection.cpp:245:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t sz = file.read(buffer, BUFSIZE); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:647:32: [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). return _write_len(fp, str, strlen(str)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:846: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). fcitx_desktop_file_hash_add(file, group, strlen(group->name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.c:958:52: [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). fcitx_desktop_group_hash_add(group, entry, strlen(entry->name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:160:55: [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). strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:167:56: [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). strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:180:25: [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). file, name, strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:195:31: [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). file, base, name, strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:203:31: [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). file, base, name, strlen(name), move); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:219:31: [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). file, base, name, strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:227:31: [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). file, base, name, strlen(name), move); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:240: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). group, name, strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:256:32: [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). group, base, name, strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:264:32: [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). group, base, name, strlen(name), move); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:279:32: [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). group, base, name, strlen(name)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/desktop-parse.h:287:32: [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). group, base, name, strlen(name), move); data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:76:52: [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). return fcitx_handler_table_find_key(table, strlen(key), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:123: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). return fcitx_handler_table_append(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:130:51: [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). return fcitx_handler_table_prepend(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:137:49: [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). return fcitx_handler_table_first(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:144:48: [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). return fcitx_handler_table_last(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:151:52: [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). return fcitx_handler_table_first_id(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:158:51: [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). return fcitx_handler_table_last_id(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/handler-table.h:165: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). fcitx_handler_table_remove_key(table, strlen(keystr), data/fcitx-4.2.9.8/src/lib/fcitx-utils/log.c:118:22: [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(buffer); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:67:52: [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). HASH_ADD_KEYPTR(hh, map->items, item->key, strlen(item->key), item); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:108:53: [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 += item->hh.keylen + 1 + (item->value ? strlen("true") : data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:109: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). strlen("false")) + 1; data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:121:20: [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). strl = strlen("true"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:122:31: [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). memcpy(p, "true", strlen("true")); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:124:20: [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). strl = strlen("false"); data/fcitx-4.2.9.8/src/lib/fcitx-utils/stringmap.c:125:32: [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). memcpy(p, "false", strlen("false")); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utf8.c:399:48: [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). return fcitx_utils_get_ascii_partn(string, strlen(string)); data/fcitx-4.2.9.8/src/lib/fcitx-utils/uthash.h:222: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). HASH_FIND(hh, head, findstr, strlen(findstr), out) data/fcitx-4.2.9.8/src/lib/fcitx-utils/uthash.h:224: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). HASH_ADD(hh, head, strfield, strlen(add->strfield), add) data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:242: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). len += strlen(*str) + 1; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:251:23: [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 strl = strlen(*str); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:293: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). len += strlen(string->name) + 1; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:299:23: [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 strl = strlen(string2->name); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:333: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). HASH_ADD_KEYPTR(hh, sset, string->name, strlen(string->name), string); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:342: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). HASH_ADD_KEYPTR(hh, sset, string->name, strlen(string->name), string); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:402: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). end = s + (strlen(s) - 1); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:801:48: [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). total += (size_list[i] = str_list[i] ? strlen(str_list[i]) : 0); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:927: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(str) + 1; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.c:973: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(str) * 2 + 1; data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:351:43: [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). strlen(extra_str) + 1); data/fcitx-4.2.9.8/src/lib/fcitx-utils/utils.h:781:55: [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). return fcitx_utils_set_str_with_len(res, str, strlen(str)); data/fcitx-4.2.9.8/src/lib/fcitx/candidate.c:36:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(candList->strChoose, DIGIT_STR_CHOOSE, MAX_CAND_WORD); data/fcitx-4.2.9.8/src/lib/fcitx/candidate.c:343:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(candList->strChoose, strChoose, MAX_CAND_WORD); data/fcitx-4.2.9.8/src/lib/fcitx/context.c:59: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). HASH_ADD_KEYPTR(hh, instance->context, context->name, strlen(context->name), context); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:364:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry->langCode, langCode, LANGCODE_LENGTH); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:464:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry->langCode, langCode, LANGCODE_LENGTH); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:659:13: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(FcitxInputStateGetOutputString(input), " "); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:1985: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 (strncmp(cur, "zh", 2) == 0 && strlen(cur) == 5) { data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:2030:75: [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). HASH_ADD_KEYPTR(hh, instance->unusedItem, item->name, strlen(item->name), item); data/fcitx-4.2.9.8/src/lib/fcitx/ime.c:2091: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). if (strncmp(ime->uniqueName, *pstr, strlen(ime->uniqueName)) == 0) data/fcitx-4.2.9.8/src/lib/fcitx/instance.c:316:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (read(instance->fd, &signo, sizeof(char)) > 0) { data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:147:44: [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). res_len += (name_lens[count] = strlen(imname)); \ data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:156:52: [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). ADD_IM_NAME(ime->uniqueName, ":True,", strlen(":True,")); data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:163:53: [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). ADD_IM_NAME(ime->uniqueName, ":False,", strlen(":False,")); data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:171:25: [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). s_len = strlen(":True,"); data/fcitx-4.2.9.8/src/lib/fcitx/profile.c:174:25: [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). s_len = strlen(":False,"); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:829: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). extraLength += strlen(FcitxMessagesGetMessageString(input->msgAuxUp, i)); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:872:35: [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 (candWord->strExtra && strlen(candWord->strExtra)) data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:894: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). length += strlen(msg_str); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:919:23: [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). length += strlen(msg_str); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:949: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). len += strlen(strTemp); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:950: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). len += strlen(candWord->strWord); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:952:35: [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 (candWord->strExtra && strlen(candWord->strExtra)) data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:953:20: [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(candWord->strExtra); data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:972:35: [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 (candWord->strExtra && strlen(candWord->strExtra)) data/fcitx-4.2.9.8/src/lib/fcitx/ui.c:975:9: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(result, " "); data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c:181: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). size_t len = str ? strlen(str) : 0; data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c:556: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(line) > MAX_AUTO_TO_ENG) data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c:558:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(autoeng.str, line, MAX_AUTO_TO_ENG); data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c:659: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). buff_len = strlen(autoEngState->buf); data/fcitx-4.2.9.8/src/module/autoeng/AutoEng.c:660:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(raw_buff, autoEngState->buf, MAX_USER_INPUT); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:216:55: [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 (!im || strncmp(im->langCode, "zh", 2) != 0 || strlen(im->langCode) == 2) data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:293:55: [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). ret = (char *) malloc(sizeof(char) * (strlen(strHZ) + 1)); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:312:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s2t->str, ps, s2t->len); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:338:17: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(ret, ps, chr_len); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:396:55: [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). ret = (char *) malloc(sizeof(char) * (strlen(strHZ) + 1)); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:415:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(t2s->str, strBuf, t2s->len); data/fcitx-4.2.9.8/src/module/chttrans/chttrans.c:441:17: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(ret, ps, chr_len); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:293:40: [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). res = malloc(begin_len + end_len + strlen(CLIPBOARD_CAND_SEP) + 1); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:297:35: [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). memcpy(p, CLIPBOARD_CAND_SEP, strlen(CLIPBOARD_CAND_SEP)); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:298:10: [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). p += strlen(CLIPBOARD_CAND_SEP); data/fcitx-4.2.9.8/src/module/clipboard/clipboard.c:467:33: [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). strlen(CLIPBOARD_CAND_SEP)) / 2; data/fcitx-4.2.9.8/src/module/freedesktop-notify/freedesktop-notify.c:346: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(newName) > 0) { data/fcitx-4.2.9.8/src/module/fullwidthchar/fullwidthchar.c:169:28: [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). ret_len += strlen(sCornerTrans[ps[0] - 32]); data/fcitx-4.2.9.8/src/module/fullwidthchar/fullwidthchar.c:171:17: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(ret, ps, chr_len); data/fcitx-4.2.9.8/src/module/lua/lua.c:82:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(FcitxInputStateGetOutputString(input), data/fcitx-4.2.9.8/src/module/lua/luawrap.c:178: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(command_name) > 2) { data/fcitx-4.2.9.8/src/module/lua/luawrap.c:311:25: [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 keylen = strlen(trigger->key); data/fcitx-4.2.9.8/src/module/lua/luawrap.c:348: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). HASH_ADD_KEYPTR(hh, module->extensions, extension->name, strlen(extension->name), extension); data/fcitx-4.2.9.8/src/module/lua/luawrap.c:467: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). strlen(command->command_name), data/fcitx-4.2.9.8/src/module/lua/luawrap.c:518:67: [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). HASH_ADD_KEYPTR(hh, module->input_triggers, trigger->key, strlen(trigger->key), trigger); data/fcitx-4.2.9.8/src/module/lua/luawrap.c:725:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(key, input, sizeof(key)); data/fcitx-4.2.9.8/src/module/lua/luawrap.c:732: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(input) > 2) { data/fcitx-4.2.9.8/src/module/lua/luawrap.c:742:12: [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). || strlen(input) < module->shortest_input_trigger_key_length) { data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c:368: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). strlen("fcitx-keyboard-")) != 0) { data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c:482:25: [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). strlen("fcitx-keyboard-")) == 0) { data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c:483:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(notificationitem->layoutNameBuffer, im->uniqueName + strlen("fcitx-keyboard-"), 2); data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c:483:78: [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). strncpy(notificationitem->layoutNameBuffer, im->uniqueName + strlen("fcitx-keyboard-"), 2); data/fcitx-4.2.9.8/src/module/notificationitem/notificationitem.c:635: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). FcitxNotificationItemSetAvailable (notificationitem, strlen(newName) > 0); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:63: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). int len = strlen(pyenhance->cfp_mode_selected); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:64: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). int len2 = strlen(cand_word->strWord); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:127:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cand_word->strWord, *cur_list, UTF8_MAX_LENGTH); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:138:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_word.strWord, *cur_list, UTF8_MAX_LENGTH); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:198:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buff, p, UTF8_MAX_LENGTH); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:202:11: [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(selected); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:325: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). int len = strlen(pyenhance->cfp_mode_selected); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:327:20: [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 len2 = strlen(cur_full); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:358: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). int len = strlen(word); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-cfp.c:368:13: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(full, word, len); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.c:62:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, FcitxInputStateGetRawInputBuffer(input), len); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.c:162: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(str); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.c:163:29: [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(str, "ng", strlen("ng"))) data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.c:220: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). pinyin_len = strlen(pinyin); data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-spell.c:258: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). words_type[words_count++] = (strlen(last_start) == 2 ? data/fcitx-4.2.9.8/src/module/pinyin-enhance/pinyin-enhance-sym.c:187:17: [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 sym_l = strlen(sym); data/fcitx-4.2.9.8/src/module/punc/punc.c:389:69: [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). HASH_ADD_KEYPTR(hh, puncState->puncSet, punc->langCode, strlen(punc->langCode), punc); data/fcitx-4.2.9.8/src/module/punc/punc.c:406: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(filename) < strlen(PUNC_DICT_FILENAME)) data/fcitx-4.2.9.8/src/module/punc/punc.c:406:28: [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(filename) < strlen(PUNC_DICT_FILENAME)) data/fcitx-4.2.9.8/src/module/punc/punc.c:428: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). i = strlen(strText) - 1; data/fcitx-4.2.9.8/src/module/punc/punc.c:475: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). const char* langcode = filename + strlen(PUNC_DICT_FILENAME); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:161:11: [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(((QUICK_PHRASE*)a)->strCode); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:277:25: [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 keylen = strlen(buf1); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:278: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(buf1) >= QUICKPHRASE_CODE_LEN) data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:281:28: [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 phraselen = strlen(p); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:282: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(p) >= QUICKPHRASE_PHRASE_LEN * UTF8_MAX_LENGTH) data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:374:40: [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). FcitxInputStateSetCursorPos(input, strlen(qpstate->buffer)); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:375:46: [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(qpstate->buffer) + strlen(c)); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:375:72: [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(qpstate->buffer) + strlen(c)); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:402: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 (c[0] && strlen(qpstate->buffer) == 0 && data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:414:17: [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(qpstate->buffer) < MAX_USER_INPUT) data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:420:22: [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(qpstate->buffer); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:430:22: [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(qpstate->buffer); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:435:48: [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[]){strlen(c), len}); data/fcitx-4.2.9.8/src/module/quickphrase/quickphrase.c:640: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). iInputLen = strlen(qpstate->buffer); data/fcitx-4.2.9.8/src/module/remote/remote.c:155:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(client_fd, &O, sizeof(int)); data/fcitx-4.2.9.8/src/module/remote/remote.c:179:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int n = read(client_fd, imname, MAX_IMNAME_LEN-1); data/fcitx-4.2.9.8/src/module/spell/dict/comp_spell_dict.c:51:32: [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). write(ofd, DICT_BIN_MAGIC, strlen(DICT_BIN_MAGIC)); data/fcitx-4.2.9.8/src/module/spell/dict/comp_spell_dict.c:69: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). lseek(ofd, strlen(DICT_BIN_MAGIC), SEEK_SET); data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:213: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). char magic_buff[strlen(DICT_BIN_MAGIC)]; data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:219:56: [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)stat_buf.st_size <= sizeof(uint32_t) + strlen(DICT_BIN_MAGIC)) data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:221:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, magic_buff, strlen(DICT_BIN_MAGIC)) <= 0) data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:221:30: [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 (read(fd, magic_buff, strlen(DICT_BIN_MAGIC)) <= 0) data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:223:44: [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 (memcmp(DICT_BIN_MAGIC, magic_buff, strlen(DICT_BIN_MAGIC))) data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:225: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). total_len = stat_buf.st_size - strlen(DICT_BIN_MAGIC); data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:231:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = read(fd, dict->map, total_len - flen); data/fcitx-4.2.9.8/src/module/spell/spell-custom-dict.c:275:17: [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 l = strlen(dict->map + i); data/fcitx-4.2.9.8/src/module/spell/spell-enchant.c:114:41: [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). strlen(spell->current_str), &number); data/fcitx-4.2.9.8/src/module/spell/spell-enchant.c:234: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). strlen(new_word)); data/fcitx-4.2.9.8/src/module/spell/spell.c:170:54: [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 (!strcmp(lang, "zh") || !strncmp(lang, "zh_", strlen("zh_"))) data/fcitx-4.2.9.8/src/module/spell/spell.c:217:30: [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). (strlen(GET_NTH(strs, i, sizes)) + 1) : 0); data/fcitx-4.2.9.8/src/module/spell/spell.c:271:22: [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). prefix_len = strlen(prefix); data/fcitx-4.2.9.8/src/module/spell/spell.c:317: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). *len = strlen(str); data/fcitx-4.2.9.8/src/module/spell/spell.c:342:14: [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(hint_provider[i].name) == len && data/fcitx-4.2.9.8/src/module/spell/spell.c:344:14: [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). (strlen(hint_provider[i].short_name) == len && data/fcitx-4.2.9.8/src/module/spell/spell.c:449:11: [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(lang); data/fcitx-4.2.9.8/src/module/spell/spell.c:500:11: [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(commit); data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:83:11: [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(s); data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:312: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). size_t l = strlen(s); data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:387: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(simplified) == 1) { data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:471: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 s_l = strlen(s); data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:508: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). offset += strlen(data + offset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:531: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). offset += strlen(data + offset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:578: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). offset += strlen(data + offset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:601: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). offset += strlen(data + offset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:623: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). int length = strlen(s); data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:658:63: [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). HASH_ADD_KEYPTR(hh, charselect->index, item->key, strlen(item->key), item); data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:711:28: [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). aliasOffset += strlen(data + aliasOffset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:720:28: [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). notesOffset += strlen(data + notesOffset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:729:27: [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). apprOffset += strlen(data + apprOffset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:738:28: [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). equivOffset += strlen(data + equivOffset) + 1; data/fcitx-4.2.9.8/src/module/unicode/charselectdata.c:750:28: [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). equivOffset += strlen(data + equivOffset) + 1; data/fcitx-4.2.9.8/src/module/unicode/unicode.c:127: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 len = strlen(uni->buffer); data/fcitx-4.2.9.8/src/module/unicode/unicode.c:185:17: [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(uni->buffer) < MAX_USER_INPUT) data/fcitx-4.2.9.8/src/module/unicode/unicode.c:213:40: [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). FcitxInputStateSetCursorPos(input, strlen(uni->buffer)); data/fcitx-4.2.9.8/src/module/vk/vk.c:535:17: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(strKey, " "); data/fcitx-4.2.9.8/src/module/vk/vk.c:588: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). i = strlen(pstr) - 1; data/fcitx-4.2.9.8/src/module/vk/vk.c:591:14: [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(pstr)) data/fcitx-4.2.9.8/src/module/x11/x11stuff.c:284:25: [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). sprintf(atom_name + strlen(CMPMGR_PREFIX), "%d", x11priv->iScreen); data/fcitx-4.2.9.8/src/module/xkb/rules.c:73:17: [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 sl = strlen(str); data/fcitx-4.2.9.8/src/module/xkb/rules.c:74: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). size_t sufl = strlen(suffix); data/fcitx-4.2.9.8/src/module/xkb/rules.c:106: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). size_t extra_len = strlen(file) - strlen(".xml"); data/fcitx-4.2.9.8/src/module/xkb/rules.c:106: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). size_t extra_len = strlen(file) - strlen(".xml"); data/fcitx-4.2.9.8/src/module/xkb/rules.c:108: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). char extrafile[extra_len + strlen(".extras.xml") + 1]; data/fcitx-4.2.9.8/src/module/xkb/rules.c:285:67: [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 (strcmp(XMLCHAR_CAST atts[i*2], "version") == 0 && strlen(XMLCHAR_CAST atts[i*2 + 1]) != 0) { data/fcitx-4.2.9.8/src/module/xkb/rules.c:310:10: [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(trimmed) != 0 ) { data/fcitx-4.2.9.8/src/module/xkb/xkb.c:78:20: [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). strlen("fcitx-keyboard-")) == 0; data/fcitx-4.2.9.8/src/module/xkb/xkb.c:86: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). imname += strlen("fcitx-keyboard-"); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:310:31: [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 rulesBaseLen = strlen(rulesPath) - strlen(".xml"); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:310:51: [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 rulesBaseLen = strlen(rulesPath) - strlen(".xml"); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:311: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(rulesPath) > strlen(".xml") && strcmp(rulesPath + rulesBaseLen, ".xml") == 0) { data/fcitx-4.2.9.8/src/module/xkb/xkb.c:311:33: [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(rulesPath) > strlen(".xml") && strcmp(rulesPath + rulesBaseLen, ".xml") == 0) { data/fcitx-4.2.9.8/src/module/xkb/xkb.c:371:25: [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 = (rules_file ? strlen (rules_file) : 0); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:372: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). len += (model ? strlen (model) : 0); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:373:27: [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 += (all_layouts ? strlen (all_layouts) : 0); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:374:28: [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 += (all_variants ? strlen (all_variants) : 0); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:375:27: [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 += (all_options ? strlen (all_options) : 0); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:392:17: [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). next += strlen (rules_file); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:397:17: [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). next += strlen (model); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:402:17: [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). next += strlen (all_layouts); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:407:17: [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). next += strlen (all_variants); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:412:17: [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). next += strlen (all_options); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:437:25: [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 (pVariantName && strlen(*pVariantName) != 0) data/fcitx-4.2.9.8/src/module/xkb/xkb.c:1001: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). override->im, strlen(override->im), override); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:1100:25: [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). strlen(item->im), item); data/fcitx-4.2.9.8/src/module/xkb/xkb.c:1122:25: [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). strlen(item->im), item); data/fcitx-4.2.9.8/src/module/xkbdbus/xkbdbus.c:335: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(newName) > 0) { data/fcitx-4.2.9.8/src/ui/cairostuff/font.c:52:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(locale, strUserLocale, 2); data/fcitx-4.2.9.8/src/ui/cairostuff/font.c:65:51: [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). fcitx_utils_local_cat_str(strpat, strlen(":lang=") + sizeof(locale), data/fcitx-4.2.9.8/src/ui/cairostuff/font.c:112:13: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(*font, ""); data/fcitx-4.2.9.8/src/ui/classic/InputWindow.c:153: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). int length = strlen(FcitxMessagesGetMessageString(msgup, i)); data/fcitx-4.2.9.8/src/ui/classic/InputWindow.c:158:21: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, strUp[i], iChar); data/fcitx-4.2.9.8/src/ui/classic/skin.c:195:54: [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). HASH_ADD_KEYPTR(hh, sc->imageTable, image->name, strlen(image->name), image); data/fcitx-4.2.9.8/src/ui/classic/skin.c:243: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(name) > 0 && strcmp(name , "NONE") != 0) { data/fcitx-4.2.9.8/src/ui/classic/skin.c:279:25: [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). strlen(image->name), image); data/fcitx-4.2.9.8/src/ui/classic/skin.c:764:17: [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). strlen("fcitx-keyboard-")) == 0) { data/fcitx-4.2.9.8/src/ui/classic/skin.c:769:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(temp, im->langCode, LANGCODE_LENGTH); data/fcitx-4.2.9.8/src/ui/classic/skin.c:773:41: [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). iconText = im->uniqueName + strlen("fcitx-keyboard-"); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:219: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). #define INDICATOR_KEYBOARD_LENGTH (strlen(INDICATOR_KEYBOARD_PREFIX)) data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:232:17: [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). strlen("fcitx-keyboard-")) != 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:262:25: [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). strlen("fcitx-keyboard-")) == 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:272:43: [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). imname = im->uniqueName + strlen("fcitx-keyboard-"); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:603:17: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(cmb, ""); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:612: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 (strlen(cmb) + strlen(msgstr) + 1 < KIMPANEL_BUFFER_SIZE) data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:612:35: [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(cmb) + strlen(msgstr) + 1 < KIMPANEL_BUFFER_SIZE) data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:778:17: [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(s0) > strlen("/Fcitx/")) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:778:30: [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(s0) > strlen("/Fcitx/")) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:779:23: [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). s0 += strlen("/Fcitx/"); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:794:49: [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). } else if (strncmp("logo/", s0, strlen("logo/")) == 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:795:27: [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). s0 += strlen("logo/"); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:804: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). } else if (strncmp("im/", s0, strlen("im/")) == 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:805:27: [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). s0 += strlen("im/"); data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:807:46: [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). } else if (strncmp("im", s0, strlen("im")) == 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:905: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(oldName) > 0 && strlen(newName) == 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:905: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). if (strlen(oldName) > 0 && strlen(newName) == 0) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:1637:17: [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(FcitxMessagesGetMessageString(messageUp, i)) > iChar) { data/fcitx-4.2.9.8/src/ui/kimpanel/kimpanel.c:1640: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). iChar -= strlen(FcitxMessagesGetMessageString(messageUp, i)); data/fcitx-4.2.9.8/test/testpinyin.c:17:13: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, " "); data/fcitx-4.2.9.8/test/testutf8.c:47:48: [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). strlen(UTF8_PART2 ASCII_PART2)), data/fcitx-4.2.9.8/test/testutf8.c:48:33: [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). ASCII_PART2, strlen(ASCII_PART2)) == 0); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:135: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). int8_t len = strlen(PYFAList[i].pyBase[j].strHZ); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:169: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(strPhrase) < 3) data/fcitx-4.2.9.8/tools/cli/createPYMB.c:212:77: [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). phrase->strPhrase = (char *) malloc(sizeof(char) * (strlen(strPhrase) - fcitx_utf8_char_len(strPhrase) + 1)); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:245:31: [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). int8_t clen = strlen(PYFAList[i].pyBase[j].strHZ); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:254: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). int32_t slen = strlen(t->strPhrase); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:255:30: [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). iIndex = strlen(t->strMap); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:259:56: [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). fwrite(t->strPhrase, sizeof(char), strlen(t->strPhrase), fp2); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:363:30: [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). int8_t len = strlen(t->strHZ); data/fcitx-4.2.9.8/tools/cli/createPYMB.c:385:22: [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). int8_t len = strlen(t->strHZ); data/fcitx-4.2.9.8/tools/cli/fcitx-remote.c:141:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(socket_fd, &buf, sizeof(buf)); data/fcitx-4.2.9.8/tools/cli/fcitx-remote.c:144:33: [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). write(socket_fd, imname, strlen(imname)); data/fcitx-4.2.9.8/tools/cli/mb2org.c:147:9: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(tPY, "*"); data/fcitx-4.2.9.8/tools/cli/mb2txt.c:175:25: [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). char* temp = malloc(strlen(strCode) * sizeof(char) + 3); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:37:70: [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). #define ADD_LENGTH(str, x) ((strstr((str), strConst[x]) == (str)) ? (strlen(strConst[x])) : (strlen(strConstNew[x]))) data/fcitx-4.2.9.8/tools/cli/txt2mb.c:37:94: [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). #define ADD_LENGTH(str, x) ((strstr((str), strConst[x]) == (str)) ? (strlen(strConst[x])) : (strlen(strConstNew[x]))) data/fcitx-4.2.9.8/tools/cli/txt2mb.c:140: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). i = strlen(buf) - 1; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:220:17: [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). i = strlen(buf) - 1; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:269:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strTemp, pstr, p - pstr); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:331:17: [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). i = strlen(buf) - 1; data/fcitx-4.2.9.8/tools/cli/txt2mb.c:383: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). if (((buf1[0] != cPinyinKey) && (strlen(buf1) > iCodeLength)) data/fcitx-4.2.9.8/tools/cli/txt2mb.c:384: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). || ((buf1[0] == cPinyinKey) && (strlen(buf1) > (iPYCodeLength + 1))) data/fcitx-4.2.9.8/tools/cli/txt2mb.c:385: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). || ((buf1[0] == cPhraseKey) && (strlen(buf1) > (iCodeLength + 1))) data/fcitx-4.2.9.8/tools/cli/txt2mb.c:386: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). || ((buf1[0] == cPromptKey) && (strlen(buf1) > (iPYCodeLength + 1))) data/fcitx-4.2.9.8/tools/cli/txt2mb.c:449:69: [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). newRec->strHZ = (char *) fcitx_utils_malloc0(sizeof(char) * strlen(strHZ) + 1); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:501:23: [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). iTemp = (uint32_t)strlen(strInputCode); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:506:23: [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). iTemp = (uint32_t)strlen(strIgnoreChars); data/fcitx-4.2.9.8/tools/cli/txt2mb.c:531: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). s = strlen(current->strHZ) + 1; data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:108:20: [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 lang_len = strlen(lang); data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:134:22: [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 id_len = strlen(msg_id); data/fcitx-4.2.9.8/tools/dev/fcitx-po-parser.c:135:23: [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 str_len = strlen(msg_str); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:185:32: [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). return _write_len(fp, str, strlen(str)); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:200: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). int len = strlen(str2); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:296:25: [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 prefix_len = strlen(prefix); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:388: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). int len = strlen(map->key); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:590:34: [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("va_list", type, strlen("va_list"))) data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:592: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). type += strlen("va_list"); data/fcitx-4.2.9.8/tools/dev/fcitx-scanner.c:729:28: [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). addon_desc->name_len = strlen(addon_desc->name); ANALYSIS SUMMARY: Hits = 1154 Lines analyzed = 166190 in approximately 3.43 seconds (48411 lines/second) Physical Source Lines of Code (SLOC) = 141726 Hits@level = [0] 243 [1] 503 [2] 403 [3] 44 [4] 201 [5] 3 Hits@level+ = [0+] 1397 [1+] 1154 [2+] 651 [3+] 248 [4+] 204 [5+] 3 Hits/KSLOC@level+ = [0+] 9.85705 [1+] 8.14247 [2+] 4.59337 [3+] 1.74986 [4+] 1.4394 [5+] 0.0211676 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.