Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/fcitx5-5.0.1/src/frontend/dbusfrontend/dbusfrontend.cpp
Examining data/fcitx5-5.0.1/src/frontend/dbusfrontend/dbusfrontend.h
Examining data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp
Examining data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.h
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandim.cpp
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandim.h
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandim_public.h
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandimserver.cpp
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandimserver.h
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandimserverv2.cpp
Examining data/fcitx5-5.0.1/src/frontend/waylandim/waylandimserverv2.h
Examining data/fcitx5-5.0.1/src/frontend/xim/xim.cpp
Examining data/fcitx5-5.0.1/src/frontend/xim/xim.h
Examining data/fcitx5-5.0.1/src/im/keyboard/chardata.h
Examining data/fcitx5-5.0.1/src/im/keyboard/isocodes.cpp
Examining data/fcitx5-5.0.1/src/im/keyboard/isocodes.h
Examining data/fcitx5-5.0.1/src/im/keyboard/keyboard.cpp
Examining data/fcitx5-5.0.1/src/im/keyboard/keyboard.h
Examining data/fcitx5-5.0.1/src/im/keyboard/keyboard_public.h
Examining data/fcitx5-5.0.1/src/im/keyboard/xkbrules.cpp
Examining data/fcitx5-5.0.1/src/im/keyboard/xkbrules.h
Examining data/fcitx5-5.0.1/src/im/keyboard/xmlparser.cpp
Examining data/fcitx5-5.0.1/src/im/keyboard/xmlparser.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/configuration.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/configuration.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/dbushelper.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/dbushelper.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/enum.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/iniparser.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/iniparser.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/marshallfunction.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/marshallfunction.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/option.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/option.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/option_details.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/optiontypename.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/rawconfig.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-config/rawconfig.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/capabilityflags.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/charutils.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/color.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/color.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/connectableobject.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/connectableobject.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/cutf8.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/cutf8.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/bus.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/message.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/message_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/objectvtable_libdbus.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/objectvtable_p_libdbus.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/servicenamecache.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/servicenamecache.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/matchrule.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/matchrule.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/message.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/message_details.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/objectvtable.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/objectvtable.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/objectvtable_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/bus.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/bus_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/message.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/message_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/objectvtable_p_sdbus.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/objectvtable_sdbus.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/objectvtablewrapper.c
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/objectvtablewrapper_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/sdbus/sd-bus-wrap.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/servicewatcher.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/servicewatcher.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/utils_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/variant.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/variant.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/element.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/element.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/event.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/event_common.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/event_libevent.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/event_sdevent.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/eventdispatcher.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/eventdispatcher.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/flags.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/handlertable.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/handlertable_details.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/i18n.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/i18n.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/i18nstring.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/i18nstring.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/inputbuffer.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/inputbuffer.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/intrusivelist.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/key.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/key.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/keydata.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/keynametable-compat.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/keynametable.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/keysym.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/keysymgen.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/library.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/library.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/log.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/log.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/macros.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/metastring.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/misc.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/misc.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/misc_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/rect.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/signals.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/signals_details.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/stringutils.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/stringutils.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/stringutils_details.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/testing.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/testing.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/textformatflags.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/trackableobject.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/tuplehelpers.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/unixfd.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/unixfd.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/utf8.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-utils/utf8.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/display.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/display.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/outputinfomation.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/outputinformation.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_buffer.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_buffer.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_callback.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_callback.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_compositor.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_compositor.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_device.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_device.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_device_manager.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_device_manager.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_offer.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_offer.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_source.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_data_source.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_keyboard.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_keyboard.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_output.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_output.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_pointer.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_pointer.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_region.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_region.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_registry.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_registry.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_seat.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_seat.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shell.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shell.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shell_surface.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shell_surface.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shm.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shm.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shm_pool.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_shm_pool.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_subcompositor.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_subcompositor.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_subsurface.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_subsurface.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_surface.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_surface.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_touch.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/core/wl_touch.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_method_keyboard_grab_v2.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_method_keyboard_grab_v2.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_method_manager_v2.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_method_manager_v2.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_method_v2.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_method_v2.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_popup_surface_v2.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_input_popup_surface_v2.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_virtual_keyboard_manager_v1.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_virtual_keyboard_manager_v1.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_virtual_keyboard_v1.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method-v2/zwp_virtual_keyboard_v1.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_method_context_v1.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_method_context_v1.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_method_v1.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_method_v1.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_panel_surface_v1.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_panel_surface_v1.h
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_panel_v1.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx-wayland/input-method/zwp_input_panel_v1.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/action.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/action.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonfactory.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonfactory.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addoninfo.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/addoninfo.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addoninstance.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/addoninstance.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addoninstance_details.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonloader.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonloader.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonloader_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonmanager.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/addonmanager.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/candidatelist.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/candidatelist.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/event.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/event.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/focusgroup.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/focusgroup.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/focusgroup_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/frontend.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/frontend.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/globalconfig.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/globalconfig.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/icontheme.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontext.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontext.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontext_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontextmanager.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontextmanager.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontextproperty.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontextproperty.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputcontextproperty_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodconfig_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodengine.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodentry.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodentry.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodgroup.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodgroup.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodmanager.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputmethodmanager.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputpanel.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/inputpanel.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/instance.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/menu.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/menu.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/misc_p.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/statusarea.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/statusarea.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/surroundingtext.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/surroundingtext.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/text.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/text.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/userinterface.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/userinterface.h
Examining data/fcitx5-5.0.1/src/lib/fcitx/userinterfacemanager.cpp
Examining data/fcitx5-5.0.1/src/lib/fcitx/userinterfacemanager.h
Examining data/fcitx5-5.0.1/src/modules/clipboard/clipboard.cpp
Examining data/fcitx5-5.0.1/src/modules/clipboard/clipboard.h
Examining data/fcitx5-5.0.1/src/modules/clipboard/clipboard_public.h
Examining data/fcitx5-5.0.1/src/modules/dbus/dbus_public.h
Examining data/fcitx5-5.0.1/src/modules/dbus/dbusmodule.cpp
Examining data/fcitx5-5.0.1/src/modules/dbus/dbusmodule.h
Examining data/fcitx5-5.0.1/src/modules/emoji/emoji.cpp
Examining data/fcitx5-5.0.1/src/modules/emoji/emoji.h
Examining data/fcitx5-5.0.1/src/modules/emoji/emoji_public.h
Examining data/fcitx5-5.0.1/src/modules/imselector/imselector.cpp
Examining data/fcitx5-5.0.1/src/modules/imselector/imselector.h
Examining data/fcitx5-5.0.1/src/modules/notificationitem/dbusmenu.cpp
Examining data/fcitx5-5.0.1/src/modules/notificationitem/dbusmenu.h
Examining data/fcitx5-5.0.1/src/modules/notificationitem/notificationitem.cpp
Examining data/fcitx5-5.0.1/src/modules/notificationitem/notificationitem.h
Examining data/fcitx5-5.0.1/src/modules/notificationitem/notificationitem_public.h
Examining data/fcitx5-5.0.1/src/modules/notifications/notifications.cpp
Examining data/fcitx5-5.0.1/src/modules/notifications/notifications.h
Examining data/fcitx5-5.0.1/src/modules/notifications/notifications_public.h
Examining data/fcitx5-5.0.1/src/modules/quickphrase/quickphrase.cpp
Examining data/fcitx5-5.0.1/src/modules/quickphrase/quickphrase.h
Examining data/fcitx5-5.0.1/src/modules/quickphrase/quickphrase_public.h
Examining data/fcitx5-5.0.1/src/modules/quickphrase/quickphraseprovider.cpp
Examining data/fcitx5-5.0.1/src/modules/quickphrase/quickphraseprovider.h
Examining data/fcitx5-5.0.1/src/modules/spell/dict/comp_spell_dict.cpp
Examining data/fcitx5-5.0.1/src/modules/spell/spell-custom-dict.cpp
Examining data/fcitx5-5.0.1/src/modules/spell/spell-custom-dict.h
Examining data/fcitx5-5.0.1/src/modules/spell/spell-custom.cpp
Examining data/fcitx5-5.0.1/src/modules/spell/spell-custom.h
Examining data/fcitx5-5.0.1/src/modules/spell/spell-enchant.cpp
Examining data/fcitx5-5.0.1/src/modules/spell/spell-enchant.h
Examining data/fcitx5-5.0.1/src/modules/spell/spell.cpp
Examining data/fcitx5-5.0.1/src/modules/spell/spell.h
Examining data/fcitx5-5.0.1/src/modules/spell/spell_public.h
Examining data/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp
Examining data/fcitx5-5.0.1/src/modules/unicode/charselectdata.h
Examining data/fcitx5-5.0.1/src/modules/unicode/unicode.cpp
Examining data/fcitx5-5.0.1/src/modules/unicode/unicode.h
Examining data/fcitx5-5.0.1/src/modules/wayland/wayland_public.h
Examining data/fcitx5-5.0.1/src/modules/wayland/waylandmodule.cpp
Examining data/fcitx5-5.0.1/src/modules/wayland/waylandmodule.h
Examining data/fcitx5-5.0.1/src/modules/xcb/xcb_public.h
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbconnection.cpp
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbconnection.h
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbconvertselection.cpp
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbconvertselection.h
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbeventreader.cpp
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbeventreader.h
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbkeyboard.cpp
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbkeyboard.h
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbmodule.cpp
Examining data/fcitx5-5.0.1/src/modules/xcb/xcbmodule.h
Examining data/fcitx5-5.0.1/src/server/errorhandler.cpp
Examining data/fcitx5-5.0.1/src/server/errorhandler.h
Examining data/fcitx5-5.0.1/src/server/main.cpp
Examining data/fcitx5-5.0.1/src/tools/remote.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/buffer.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/buffer.h
Examining data/fcitx5-5.0.1/src/ui/classic/classicui.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/classicui.h
Examining data/fcitx5-5.0.1/src/ui/classic/common.h
Examining data/fcitx5-5.0.1/src/ui/classic/inputwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/inputwindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/theme.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/theme.h
Examining data/fcitx5-5.0.1/src/ui/classic/waylandeglwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/waylandeglwindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/waylandinputwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/waylandinputwindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/waylandpointer.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/waylandpointer.h
Examining data/fcitx5-5.0.1/src/ui/classic/waylandshmwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/waylandshmwindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/waylandui.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/waylandui.h
Examining data/fcitx5-5.0.1/src/ui/classic/waylandwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/waylandwindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/window.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/window.h
Examining data/fcitx5-5.0.1/src/ui/classic/xcbinputwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/xcbinputwindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/xcbmenu.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/xcbmenu.h
Examining data/fcitx5-5.0.1/src/ui/classic/xcbtraywindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/xcbtraywindow.h
Examining data/fcitx5-5.0.1/src/ui/classic/xcbui.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/xcbui.h
Examining data/fcitx5-5.0.1/src/ui/classic/xcbwindow.cpp
Examining data/fcitx5-5.0.1/src/ui/classic/xcbwindow.h
Examining data/fcitx5-5.0.1/src/ui/kimpanel/kimpanel.cpp
Examining data/fcitx5-5.0.1/src/ui/kimpanel/kimpanel.h
Examining data/fcitx5-5.0.1/test/addon/dummyaddon.cpp
Examining data/fcitx5-5.0.1/test/addon/dummyaddon_public.h
Examining data/fcitx5-5.0.1/test/testaddon.cpp
Examining data/fcitx5-5.0.1/test/testcandidatelist.cpp
Examining data/fcitx5-5.0.1/test/testcolor.cpp
Examining data/fcitx5-5.0.1/test/testconfig.cpp
Examining data/fcitx5-5.0.1/test/testconfig.h
Examining data/fcitx5-5.0.1/test/testconfigdbus.cpp
Examining data/fcitx5-5.0.1/test/testdbus.cpp
Examining data/fcitx5-5.0.1/test/testdbusmessage.cpp
Examining data/fcitx5-5.0.1/test/testelement.cpp
Examining data/fcitx5-5.0.1/test/testemoji.cpp
Examining data/fcitx5-5.0.1/test/testevent.cpp
Examining data/fcitx5-5.0.1/test/testeventdispatcher.cpp
Examining data/fcitx5-5.0.1/test/testflags.cpp
Examining data/fcitx5-5.0.1/test/testfs.cpp
Examining data/fcitx5-5.0.1/test/testhandlertable.cpp
Examining data/fcitx5-5.0.1/test/testi18nstring.cpp
Examining data/fcitx5-5.0.1/test/testicontheme.cpp
Examining data/fcitx5-5.0.1/test/testinputbuffer.cpp
Examining data/fcitx5-5.0.1/test/testinputcontext.cpp
Examining data/fcitx5-5.0.1/test/testisocodes.cpp
Examining data/fcitx5-5.0.1/test/testkey.cpp
Examining data/fcitx5-5.0.1/test/testlibrary.cpp
Examining data/fcitx5-5.0.1/test/testlist.cpp
Examining data/fcitx5-5.0.1/test/testlog.cpp
Examining data/fcitx5-5.0.1/test/testmenu.cpp
Examining data/fcitx5-5.0.1/test/testmetastring.cpp
Examining data/fcitx5-5.0.1/test/testquickphrase.cpp
Examining data/fcitx5-5.0.1/test/testservicewatcher.cpp
Examining data/fcitx5-5.0.1/test/testsignals.cpp
Examining data/fcitx5-5.0.1/test/teststandardpath.cpp
Examining data/fcitx5-5.0.1/test/teststringutils.cpp
Examining data/fcitx5-5.0.1/test/testsurroundingtext.cpp
Examining data/fcitx5-5.0.1/test/testunicode.cpp
Examining data/fcitx5-5.0.1/test/testunixfd.cpp
Examining data/fcitx5-5.0.1/test/testuserinterfacemanager.cpp
Examining data/fcitx5-5.0.1/test/testutf8.cpp
Examining data/fcitx5-5.0.1/test/testxim.cpp
Examining data/fcitx5-5.0.1/test/testxkbrules.cpp
Examining data/fcitx5-5.0.1/testing/testfrontend/testfrontend.cpp
Examining data/fcitx5-5.0.1/testing/testfrontend/testfrontend.h
Examining data/fcitx5-5.0.1/testing/testfrontend/testfrontend_public.h
Examining data/fcitx5-5.0.1/testing/testim/testim.cpp
Examining data/fcitx5-5.0.1/testing/testim/testim.h
Examining data/fcitx5-5.0.1/testing/testim/testim_public.h
Examining data/fcitx5-5.0.1/testing/testui/testui.cpp
Examining data/fcitx5-5.0.1/testing/testui/testui.h

FINAL RESULTS:

data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.cpp:193:28:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
std::optional<std::string> readlink(const std::string &path) {
data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.cpp:199:22:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        readSize = ::readlink(path.data(), buffer.data(), buffer.size());
data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.h:43:46:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
FCITXUTILS_EXPORT std::optional<std::string> readlink(const std::string &path);
data/fcitx5-5.0.1/src/lib/fcitx-utils/misc.cpp:61:25:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
    if (auto link = fs::readlink(path)) {
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:164:9:  [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/fcitx5-5.0.1/src/frontend/xim/xim.cpp:76:20:  [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.
    int len = std::vsnprintf(onechar, 1, fmt, argp);
data/fcitx5-5.0.1/src/frontend/xim/xim.cpp:85:10:  [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.
    std::vsnprintf(buf.data(), len, fmt, argp);
data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.cpp:19: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.
            access(path.c_str(), R_OK | X_OK) == 0);
data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.cpp:25: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.
            access(path.c_str(), R_OK) == 0);
data/fcitx5-5.0.1/src/lib/fcitx-utils/misc.cpp:46: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(argv[0], argv.data());
data/fcitx5-5.0.1/src/lib/fcitx-utils/stringutils_details.h:65:21:  [4] (format) snprintf:
  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.
        auto size = snprintf(buffer_, sizeof(buffer_), FORMAT_STRING, i);      \
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:1227:13:  [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/fcitx5-5.0.1/test/testxim.cpp:96:9:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vprintf(fmt, argp);
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:71: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.
    auto *path = getenv("IBUS_ADDRESS_FILE");
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:79:29:  [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 (auto *display = getenv("WAYLAND_DISPLAY")) {
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:82: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.
    } else if (auto *display = getenv("DISPLAY")) {
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:122:21:  [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.
    auto *address = getenv("IBUS_ADDRESS");
data/fcitx5-5.0.1/src/frontend/xim/xim.cpp:59: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("XMODIFIERS");
data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus.cpp:258:15:  [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.
    auto *e = getenv("DBUS_SESSION_BUS_ADDRESS");
data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus.cpp:262: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.
    auto *xdg = getenv("XDG_RUNTIME_DIR");
data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus.cpp:275: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.
        if (char *env = getenv("DBUS_SYSTEM_BUS_ADDRESS")) {
data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus.cpp:281:29:  [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 (char *starter = getenv("DBUS_STARTER_BUS_TYPE")) {
data/fcitx5-5.0.1/src/lib/fcitx-utils/dbus/libdbus/bus.cpp:290:29:  [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 (char *address = getenv("DBUS_STARTER_ADDRESS")) {
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:97: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 *tmpdir = getenv("TMPDIR");
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:108: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 *cdir = getenv(env);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:115: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.
                const char *home = getenv("HOME");
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:151: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 *dir = getenv(env);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:233:24:  [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 *skip = getenv("SKIP_FCITX_PATH");
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:352:28:  [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 *home = getenv("HOME");
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:695:24:  [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.
    auto *desktopEnv = getenv("XDG_CURRENT_DESKTOP");
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:700: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.
        auto *version = getenv("KDE_SESSION_VERSION");
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:790:28:  [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 *home = getenv("HOME");
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:824:28:  [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 *home = getenv("HOME");
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:82: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.
        auto *lang = getenv(vars);
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:220:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        const char *locale = getenv("LC_ALL");
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:222:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            locale = getenv("LC_CTYPE");
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:225:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
            locale = getenv("LANG");
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:1081: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,
data/fcitx5-5.0.1/src/modules/xcb/xcbkeyboard.cpp:54: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.
    auto *home = getenv("HOME");
data/fcitx5-5.0.1/src/modules/xcb/xcbmodule.cpp:28:21:  [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.
        auto *env = getenv("DISPLAY");
data/fcitx5-5.0.1/src/server/main.cpp:36: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.
    auto *home = getenv("HOME");
data/fcitx5-5.0.1/src/tools/remote.cpp: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, "chortTeam:s:")) != -1) {
data/fcitx5-5.0.1/src/ui/classic/buffer.cpp:31:24:  [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 *path = getenv("XDG_RUNTIME_DIR");
data/fcitx5-5.0.1/src/ui/kimpanel/kimpanel.cpp:30:24:  [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.
    auto *desktopEnv = getenv("XDG_CURRENT_DESKTOP");
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:128:24:  [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).
    UniqueFilePtr file(fopen(socketPath.c_str(), "rb"));
data/fcitx5-5.0.1/src/frontend/xim/xim.cpp:75: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 onechar[1];
data/fcitx5-5.0.1/src/im/keyboard/xmlparser.cpp:16:30:  [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).
    UniqueFilePtr input(std::fopen(name.c_str(), "r"));
data/fcitx5-5.0.1/src/lib/fcitx-config/iniparser.cpp:172:22:  [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).
        standardPath.open(StandardPath::Type::PkgConfig, path, O_RDONLY);
data/fcitx5-5.0.1/src/lib/fcitx-utils/cutf8.cpp:248: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/fcitx5-5.0.1/src/lib/fcitx-utils/cutf8.cpp:257:34:  [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.
        uint32_t ch = ((unsigned char *)p)[i];
data/fcitx5-5.0.1/src/lib/fcitx-utils/cutf8.cpp:335: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/fcitx5-5.0.1/src/lib/fcitx-utils/key.cpp:28: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 name[25];
data/fcitx5-5.0.1/src/lib/fcitx-utils/library.cpp:123: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).
    int fd = open(d->path_.c_str(), O_RDONLY);
data/fcitx5-5.0.1/src/lib/fcitx-utils/metastring.h:31:28:  [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 constexpr const char str_[sizeof...(c) + 1] = {c..., '\0'};
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:391:32:  [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).
StandardPathFile StandardPath::open(Type type, const std::string &path,
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:396:20:  [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).
        int fd = ::open(path.c_str(), flags);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:405:24:  [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).
            int fd = ::open(fullPath.c_str(), flags);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:430:20:  [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).
        int fd = ::open(fullPath.c_str(), flags, 0600);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:443:20:  [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).
        int fd = ::open(path.c_str(), flags);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:451:28:  [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).
                int fd = ::open(fullPath.c_str(), flags);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:479: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(cPath.get());
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:514:34:  [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).
                      int fd = ::open(fullPath.c_str(), flags);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.cpp:538:34:  [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).
                      int fd = ::open(fullPath.c_str(), flags);
data/fcitx5-5.0.1/src/lib/fcitx-utils/standardpath.h:245:22:  [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).
    StandardPathFile open(Type type, const std::string &path, int flags) const;
data/fcitx5-5.0.1/src/lib/fcitx-utils/stringutils_details.h:114: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_[IntegerBufferSize];
data/fcitx5-5.0.1/src/lib/fcitx-utils/utf8.cpp:22: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[FCITX_UTF8_MAX_LENGTH + 1];
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:178:31:  [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).
        auto fd = UnixFD::own(open(filename.c_str(), O_RDONLY));
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:647:27:  [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).
    auto fd = UnixFD::own(open(path.c_str(), O_RDONLY));
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:797:39:  [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).
                auto fd = UnixFD::own(open(file.c_str(), O_RDONLY));
data/fcitx5-5.0.1/src/lib/fcitx/icontheme.cpp:819:31:  [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).
        auto fd = UnixFD::own(open("/etc/gtk-3.0/settings.ini", O_RDONLY));
data/fcitx5-5.0.1/src/lib/fcitx/inputmethodmanager.cpp:61:22:  [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).
    auto file = path.open(StandardPath::Type::PkgConfig, "profile", O_RDONLY);
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:528:50:  [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).
    auto defaultProfile = StandardPath::global().open(
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:1117: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).
            overrideDelay = std::atoi(optarg);
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:1437: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[FCITX_UTF8_MAX_LENGTH + 1] = {'\0', '\0', '\0', '\0',
data/fcitx5-5.0.1/src/lib/fcitx/instance.cpp:1543:22:  [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).
        standardPath.open(StandardPath::Type::PkgConfig, "config", O_RDONLY);
data/fcitx5-5.0.1/src/modules/quickphrase/quickphraseprovider.cpp:38:40:  [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).
    auto file = StandardPath::global().open(StandardPath::Type::PkgData,
data/fcitx5-5.0.1/src/modules/spell/dict/comp_spell_dict.cpp:91:34:  [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).
        UnixFD ifd = UnixFD::own(open(argv[2], O_RDONLY));
data/fcitx5-5.0.1/src/modules/spell/dict/comp_spell_dict.cpp:93:25:  [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).
            UnixFD::own(open(argv[3], O_WRONLY | O_TRUNC | O_CREAT, 0644));
data/fcitx5-5.0.1/src/modules/spell/spell-custom-dict.cpp:255:27:  [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).
    auto fd = UnixFD::own(open(file.c_str(), O_RDONLY));
data/fcitx5-5.0.1/src/modules/spell/spell-custom-dict.cpp:264: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 magic_buff[sizeof(DICT_BIN_MAGIC) - 1];
data/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp:81:40:  [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).
    auto file = StandardPath::global().open(StandardPath::Type::PkgData,
data/fcitx5-5.0.1/src/modules/xcb/xcbconnection.cpp:231: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(uuid.data(), client_message->data.data8, uuid.size());
data/fcitx5-5.0.1/src/modules/xcb/xcbkeyboard.cpp:440: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(data, rnames.FIELD, FIELD##Len);                            \
data/fcitx5-5.0.1/src/server/errorhandler.cpp: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[MINIMAL_BUFFER_SIZE];
data/fcitx5-5.0.1/src/server/errorhandler.cpp:121: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.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0600);
data/fcitx5-5.0.1/src/ui/classic/buffer.cpp:40:29:  [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).
    UnixFD fd = UnixFD::own(mkstemp(v.data()));
data/fcitx5-5.0.1/src/ui/classic/classicui.cpp:76:51:  [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).
    auto themeConfigFile = StandardPath::global().open(
data/fcitx5-5.0.1/src/ui/classic/classicui.cpp:109:44:  [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).
        auto file = StandardPath::global().open(
data/fcitx5-5.0.1/src/ui/classic/theme.cpp:170:19:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        auto fd = open(icon.c_str(), O_RDONLY);
data/fcitx5-5.0.1/src/ui/classic/theme.cpp:214:49:  [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).
        auto imageFile = StandardPath::global().open(
data/fcitx5-5.0.1/src/ui/classic/xcbtraywindow.cpp:166: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 trayAtomNameBuf[100];
data/fcitx5-5.0.1/src/ui/classic/xcbtraywindow.cpp:171: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(trayAtomNameBuf, "_NET_SYSTEM_TRAY_S%d", ui_->defaultScreen());
data/fcitx5-5.0.1/src/ui/classic/xcbtraywindow.cpp:379: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 trayAtomNameBuf[100];
data/fcitx5-5.0.1/src/ui/classic/xcbtraywindow.cpp:380: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(trayAtomNameBuf, "_NET_SYSTEM_TRAY_S%d", ui_->defaultScreen());
data/fcitx5-5.0.1/test/testevent.cpp:31:30:  [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[20];
data/fcitx5-5.0.1/test/teststandardpath.cpp:58:30:  [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).
    auto file = standardPath.open(StandardPath::Type::PkgData,
data/fcitx5-5.0.1/test/teststandardpath.cpp:63:31:  [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).
    auto file2 = standardPath.open(StandardPath::Type::Data,
data/fcitx5-5.0.1/test/teststringutils.cpp:41: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 largeReplace[3 * REPEAT + 1];
data/fcitx5-5.0.1/test/teststringutils.cpp:42: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 largeReplaceCorrect[REPEAT + 1];
data/fcitx5-5.0.1/test/teststringutils.cpp:43: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 largeReplaceCorrect2[4 * REPEAT + 1];
data/fcitx5-5.0.1/test/testunixfd.cpp:20:13:  [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 f = mkstemp(fname);
data/fcitx5-5.0.1/test/testutf8.cpp:17: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/fcitx5-5.0.1/test/testutf8.cpp:36: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 utf8_buf[7];
data/fcitx5-5.0.1/src/frontend/ibusfrontend/ibusfrontend.cpp:48:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (!fin.read(buffer.data() + curSize, chunkSize)) {
data/fcitx5-5.0.1/src/im/keyboard/isocodes.cpp:132:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void IsoCodes::read(const std::string &iso639, const std::string &iso3166) {
data/fcitx5-5.0.1/src/im/keyboard/isocodes.h:32:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(const std::string &iso639, const std::string &iso3166);
data/fcitx5-5.0.1/src/im/keyboard/keyboard.cpp:152:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    isoCodes_.read(ISOCODES_ISO639_JSON, ISOCODES_ISO3166_JSON);
data/fcitx5-5.0.1/src/im/keyboard/keyboard.cpp:166:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (rule.empty() || !xkbRules_.read(rule)) {
data/fcitx5-5.0.1/src/im/keyboard/keyboard.cpp:168:19:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        xkbRules_.read(rule);
data/fcitx5-5.0.1/src/im/keyboard/xkbrules.cpp:32:21:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        return std::equal(parseStack_.end() - array.size(), parseStack_.end(),
data/fcitx5-5.0.1/src/im/keyboard/xkbrules.cpp:65: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(reinterpret_cast<const char *>(attrs[i * 2 + 1])) !=
data/fcitx5-5.0.1/src/im/keyboard/xkbrules.cpp:145:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool XkbRules::read(const std::string &fileName) {
data/fcitx5-5.0.1/src/im/keyboard/xkbrules.h:52:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool read(const std::string &fileName);
data/fcitx5-5.0.1/src/lib/fcitx-config/enum.h:73:31:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
        static constexpr bool equal(size_t idx) {                              \
data/fcitx5-5.0.1/src/lib/fcitx-config/enum.h:78:27:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
                          equal(idx + 1));                                     \
data/fcitx5-5.0.1/src/lib/fcitx-config/enum.h:81:41:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    static_assert(TYPE##I18NAnnotation::equal(0), "Enum mismatch");
data/fcitx5-5.0.1/src/lib/fcitx-utils/fs.cpp:181:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        ret = read(fd, data, maxlen);
data/fcitx5-5.0.1/src/lib/fcitx-utils/inputbuffer.h:53: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).
    bool type(const char *s) { return type(s, std::strlen(s)); }
data/fcitx5-5.0.1/src/lib/fcitx-utils/key.cpp:260:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (found + strlen(NAME) > lastModifier) {                             \
data/fcitx5-5.0.1/src/lib/fcitx-utils/key.cpp:261:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            lastModifier = found + strlen(NAME);                               \
data/fcitx5-5.0.1/src/lib/fcitx-utils/library.cpp:147:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            if (read(fd, data, statbuf.st_size) != statbuf.st_size) {
data/fcitx5-5.0.1/src/modules/spell/dict/comp_spell_dict.cpp:54: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).
    fs::safeWrite(ofd, DICT_BIN_MAGIC, strlen(DICT_BIN_MAGIC));
data/fcitx5-5.0.1/src/modules/spell/dict/comp_spell_dict.cpp:75: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).
    if (lseek(ofd, strlen(DICT_BIN_MAGIC), SEEK_SET) ==
data/fcitx5-5.0.1/src/modules/spell/spell-custom-dict.cpp:292: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).
            int l = strlen(data_.data() + i);
data/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp:486: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).
            aliasOffset += std::strlen(data + aliasOffset) + 1;
data/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp:497: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).
            notesOffset += std::strlen(data + notesOffset) + 1;
data/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp:508: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/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp:519: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/fcitx5-5.0.1/src/modules/unicode/charselectdata.cpp:532: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/fcitx5-5.0.1/src/modules/xcb/xcbkeyboard.cpp:405: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).
            FIELD##Len = static_cast<int>(strlen(rnames.FIELD));               \
data/fcitx5-5.0.1/src/server/errorhandler.cpp:105: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/fcitx5-5.0.1/src/ui/classic/xcbui.cpp:66: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 cLen = strlen(item);
data/fcitx5-5.0.1/src/ui/classic/xcbui.cpp:67:44:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
            if (next - iter > cLen && std::equal(iter, iter + cLen, item)) {
data/fcitx5-5.0.1/test/testevent.cpp:32:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                             auto size = read(fd, buf, 20);
data/fcitx5-5.0.1/test/testeventdispatcher.cpp:23:9:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
        usleep(1000);
data/fcitx5-5.0.1/test/testisocodes.cpp:14:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    isocodes.read(ISOCODES_ISO639_JSON, ISOCODES_ISO3166_JSON);
data/fcitx5-5.0.1/test/testlibrary.cpp:30: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_ASSERT(lib.findData("magic_test", MAGIC, strlen(MAGIC), parser));
data/fcitx5-5.0.1/test/testunixfd.cpp:19:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(S_IXUSR | S_IRWXG | S_IRWXO);
data/fcitx5-5.0.1/test/testxkbrules.cpp:13:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    xkbRules.read(XKEYBOARDCONFIG_XKBBASE "/rules/" DEFAULT_XKB_RULES ".xml");

ANALYSIS SUMMARY:

Hits = 139
Lines analyzed = 63490 in approximately 1.53 seconds (41412 lines/second)
Physical Source Lines of Code (SLOC) = 53167
Hits@level = [0]   9 [1]  36 [2]  59 [3]  31 [4]   9 [5]   4
Hits@level+ = [0+] 148 [1+] 139 [2+] 103 [3+]  44 [4+]  13 [5+]   4
Hits/KSLOC@level+ = [0+] 2.78368 [1+] 2.6144 [2+] 1.93729 [3+] 0.827581 [4+] 0.244513 [5+] 0.0752346
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.