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/scim-tables-0.5.14/skim/setupui/scimtablesettingplugin.cpp
Examining data/scim-tables-0.5.14/skim/setupui/scimtablesettingplugin.h
Examining data/scim-tables-0.5.14/src/scim_generic_table.cpp
Examining data/scim-tables-0.5.14/src/scim_generic_table.h
Examining data/scim-tables-0.5.14/src/scim_make_table.cpp
Examining data/scim-tables-0.5.14/src/scim_table_imengine.cpp
Examining data/scim-tables-0.5.14/src/scim_table_imengine.h
Examining data/scim-tables-0.5.14/src/scim_table_private.h
Examining data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp

FINAL RESULTS:

data/scim-tables-0.5.14/src/scim_table_imengine.cpp:408: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 (fn.c_str (), R_OK | W_OK) != 0) {
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:434: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 (fn.c_str (), R_OK | W_OK) != 0) {
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:1125: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 (file.c_str (), W_OK) != 0 && errno != ENOENT)
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:1141: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 (path.c_str (), W_OK) != 0)
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:2939:39:  [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 (ok && !data.icon.length () && access (data.icon.c_str (), R_OK) != 0) {
data/scim-tables-0.5.14/src/scim_generic_table.cpp:99: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 [4096];
data/scim-tables-0.5.14/src/scim_generic_table.cpp:378:32:  [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).
            m_max_key_length = atoi (valuestr.c_str ());
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1072:20:  [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).
            freq = atoi (freqstr.c_str ());
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1136: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, keys [i].c_str (), key_length);
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1139: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, phrases [i].c_str (), phrase_length);
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1159:14:  [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 buff [4];
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1259:18:  [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).
        offset = atoi (paramstr.c_str ());
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1260:18:  [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).
        freq   = atoi (valuestr.c_str ());
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1281:14:  [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 buf [8];
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1369:14:  [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 buf [4];
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1457:14:  [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 buf [8];
data/scim-tables-0.5.14/src/scim_generic_table.cpp:1591: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 (new_space, m_content, m_content_size);
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2042: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 (ptr, key.c_str (), key_len);
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2044: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 (ptr, utf8_phrase.c_str (), phrase_len);
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2173:41:  [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).
    if (m_sys_file.length ())      fp = fopen (m_sys_file.c_str (), "rb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2174:41:  [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).
    else if (m_usr_file.length ()) fp = fopen (m_usr_file.c_str (), "rb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2221:42:  [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).
    if (m_sys_file.length ())  sys_fp  = fopen (m_sys_file.c_str (), "rb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2222:42:  [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).
    if (m_usr_file.length ())  usr_fp  = fopen (m_usr_file.c_str (), "rb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2223:42:  [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).
    if (m_freq_file.length ()) freq_fp = fopen (m_freq_file.c_str (), "rb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2363:19:  [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).
        sys_fp  = fopen (sys.c_str (), "wb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2366:19:  [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).
        usr_fp  = fopen (usr.c_str (), "wb");
data/scim-tables-0.5.14/src/scim_generic_table.cpp:2369:19:  [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).
        freq_fp = fopen (freq.c_str (), "wb");
data/scim-tables-0.5.14/src/scim_generic_table.h:402:24:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            if (m_len) memcpy (m_masks, copy.m_masks, sizeof (CharBitMask) * m_len);
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:465: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 [2] = { 0, 0 };
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:205:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_FULL_WIDTH_PUNCT_KEY), String (""));
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:210:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_FULL_WIDTH_LETTER_KEY), String (""));
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:215:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_MODE_SWITCH_KEY), String (""));
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:220:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_ADD_PHRASE_KEY), String ("Control+a,Control+equal"));
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:225:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_DEL_PHRASE_KEY), String ("Control+d,Control+minus"));
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:229:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        m_show_prompt = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_SHOW_PROMPT), false);
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:231:35:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        m_show_key_hint = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_SHOW_KEY_HINT), false);
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:233:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        m_user_phrase_first = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_USER_PHRASE_FIRST), false);
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:235:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        m_long_phrase_first = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_LONG_PHRASE_FIRST), false);
data/scim-tables-0.5.14/src/scim_table_imengine.cpp:237:39:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        m_user_table_binary = config->read (String (SCIM_CONFIG_IMENGINE_TABLE_USER_TABLE_BINARY), false);
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:941:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            config->read (String (SCIM_CONFIG_IMENGINE_TABLE_SHOW_PROMPT),
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:944:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            config->read (String (SCIM_CONFIG_IMENGINE_TABLE_SHOW_KEY_HINT),
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:947:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            config->read (String (SCIM_CONFIG_IMENGINE_TABLE_USER_TABLE_BINARY),
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:950:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            config->read (String (SCIM_CONFIG_IMENGINE_TABLE_USER_PHRASE_FIRST),
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:953:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            config->read (String (SCIM_CONFIG_IMENGINE_TABLE_LONG_PHRASE_FIRST),
data/scim-tables-0.5.14/src/scim_table_imengine_setup.cpp:958:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                config->read (String (__config_keyboards [i].key),

ANALYSIS SUMMARY:

Hits = 45
Lines analyzed = 9193 in approximately 0.23 seconds (39135 lines/second)
Physical Source Lines of Code (SLOC) = 7100
Hits@level = [0]  79 [1]  16 [2]  24 [3]   0 [4]   5 [5]   0
Hits@level+ = [0+] 124 [1+]  45 [2+]  29 [3+]   5 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 17.4648 [1+] 6.33803 [2+] 4.08451 [3+] 0.704225 [4+] 0.704225 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.