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-pinyin-0.5.92/src/make_pinyin.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_smart_match.cpp
Examining data/scim-pinyin-0.5.92/src/scim_special_table.h
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_global.h
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_private.h
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.h
Examining data/scim-pinyin-0.5.92/src/scim_native_lookup_table.h
Examining data/scim-pinyin-0.5.92/src/scim_native_lookup_table.cpp
Examining data/scim-pinyin-0.5.92/src/make_pinyin_phrase.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_smart_match.h
Examining data/scim-pinyin-0.5.92/src/make_phrase.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_global.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.h
Examining data/scim-pinyin-0.5.92/src/scim_phrase.h
Examining data/scim-pinyin-0.5.92/src/scim_stl_map.h
Examining data/scim-pinyin-0.5.92/src/scim_pinyin.h
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_config_keys.h
Examining data/scim-pinyin-0.5.92/src/scim_phrase.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin.cpp
Examining data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp
Examining data/scim-pinyin-0.5.92/src/scim_special_table.cpp

FINAL RESULTS:

data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:649: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 (m_user_data_directory.c_str (), R_OK | W_OK) != 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:651: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 (m_user_data_directory.c_str (), R_OK | W_OK) != 0)
data/scim-pinyin-0.5.92/src/make_phrase.cpp:151:12:  [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).
			shift = atoi (argv [i]);
data/scim-pinyin-0.5.92/src/make_pinyin.cpp:84:2:  [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 [1024];
data/scim-pinyin-0.5.92/src/make_pinyin_phrase.cpp:82:2:  [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 [1024];
data/scim-pinyin-0.5.92/src/make_pinyin_phrase.cpp:156:2:  [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 [255];
data/scim-pinyin-0.5.92/src/scim_native_lookup_table.cpp: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 buf [2] = { 0, 0 };
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:136:12:  [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 bytes [16];
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:198:2:  [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 [40];
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:235:12:  [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).
		number = atoi (temp);
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:237: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).
		content_size = atoi (temp);
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:239:23:  [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).
		relation_map_size = atoi (temp);
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:253:12:  [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 bytes [16];
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:571:2:  [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 [256];
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:593:16:  [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).
	uint32 freq = atoi (freq_str.c_str());
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:594: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).
	uint32 burst = atoi (burst_str.c_str ());
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:708: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.
	unsigned char bytes [8];
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:732: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.
	unsigned char bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin.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 str[8];    /**< ASCII name of the token. */
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:615: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 [16];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:645: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 key [2];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:654: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 key [2];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1428: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 bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1461:24:  [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 (value.c_str() + len);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1481: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 bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1536: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 bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1562: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 header [40];
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1615: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 bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin.h:422: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 m_bitmap [(SCIM_PINYIN_InitialNumber * SCIM_PINYIN_FinalNumber * SCIM_PINYIN_ToneNumber) / 8 + 1];
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:213: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 *amb_names [SCIM_PINYIN_AmbLast + 2] =
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:1242: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-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:131: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.
static const char * __ambiguity_config_keys [SCIM_PINYIN_AmbLast+1] =
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:145: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.
static const char * __ambiguity_ui_strings [SCIM_PINYIN_AmbLast+1] =
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:82:12:  [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 bytes [4];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:119:2:  [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 [40];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:140: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.
	unsigned char bytes [4];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:150:12:  [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).
		number = atoi (header);
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:215: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.
			unsigned char bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:242:12:  [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 bytes [4];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:267:2:  [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 [40];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:291: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.
	unsigned char bytes [8];
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:300:12:  [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).
		number = atoi (header);
data/scim-pinyin-0.5.92/src/scim_special_table.cpp:87:2:  [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 [1024];
data/scim-pinyin-0.5.92/src/scim_special_table.cpp:319:11:  [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 (tmp) memcpy (&buf, tmp, sizeof (struct tm));
data/scim-pinyin-0.5.92/src/scim_special_table.cpp:336:3:  [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 [80];
data/scim-pinyin-0.5.92/src/scim_special_table.cpp:378:3:  [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 [80];
data/scim-pinyin-0.5.92/src/scim_special_table.cpp:410:2:  [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 [80];
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:205:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		std::strlen (scim_phrase_lib_text_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:209:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		std::strlen (scim_phrase_lib_binary_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:217: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).
	if (std::strncmp (temp, scim_phrase_lib_version, std::strlen (scim_phrase_lib_version)) != 0)
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:229:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		is.read (temp, sizeof(char) * 12);
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:268:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			is.read ((char*) bytes, sizeof(char) * 10);
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:576:6:  [1] (buffer) strlen:
  Does not handle 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 (temp) < 2) return false;
data/scim-pinyin-0.5.92/src/scim_phrase.cpp:711:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	is.read ((char*) bytes, sizeof(unsigned char) * 8);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:655:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is.read ((char*) key, sizeof (char) * 2);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:831: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).
    if (len < 0) len = strlen (str);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:884: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).
    if (len < 0) len = strlen (str);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1029: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 (len < 0) len = strlen (str);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1062: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 (len < 0) len = strlen (str);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1115: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).
    if (len < 0) len = strlen (str);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1208: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).
    if (len < 0) len = strlen (str);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1485:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    is.read ((char*)bytes, sizeof (unsigned char) * 4);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1491:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            is.read ((char*)bytes, sizeof (unsigned char) * 4);
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1571: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).
        strlen (scim_pinyin_table_text_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1575: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).
        strlen (scim_pinyin_table_binary_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1582: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).
    if (strncmp (header, scim_pinyin_table_version, strlen (scim_pinyin_table_version)) != 0)
data/scim-pinyin-0.5.92/src/scim_pinyin.cpp:1616:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        is.read ((char*) bytes, sizeof (unsigned char) * 4);
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:248:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_TONE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:251:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_INCOMPLETE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:254:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_DYNAMIC_ADJUST),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:258:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_MATCH_LONGER_PHRASE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:261:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_AUTO_COMBINE_PHRASE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:264:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_AUTO_FILL_PREEDIT),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:268:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_ALWAYS_SHOW_LOOKUP),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:271:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SHOW_ALL_KEYS),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:274:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_USER_DATA_BINARY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:278:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SAVE_PERIOD),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:281:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_DYNAMIC_SENSITIVITY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:284:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SMART_MATCH_LEVEL),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:287:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_MAX_USER_PHRASE_LENGTH),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:290:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_MAX_PREEDIT_LENGTH),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:293:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_BURST_STACK_SIZE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:297:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SYSTEM_PINYIN_TABLE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:300:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SYSTEM_PHRASE_LIB),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:303:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SYSTEM_PINYIN_PHRASE_LIB),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:306:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SYSTEM_PINYIN_PHRASE_INDEX),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:310:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SYSTEM_SPECIAL_TABLE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:314:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_USER_PINYIN_TABLE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:317:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_USER_PHRASE_LIB),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:320:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_USER_PINYIN_PHRASE_LIB),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:323:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_USER_PINYIN_PHRASE_INDEX),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:326:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_USER_SPECIAL_TABLE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:366:41:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            ambiguities [i] = m_config->read (amb, ambiguities [i]);
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:373:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_FULL_WIDTH_PUNCT_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:379:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_FULL_WIDTH_LETTER_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:385:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_MODE_SWITCH_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:394:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_CHINESE_SWITCH_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:400:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_PAGE_UP_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:406:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_PAGE_DOWN_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:412:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        str = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_DISABLE_PHRASE_KEY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:419:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SHUANG_PIN),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:424:29:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            tmp = m_config->read (String (SCIM_CONFIG_IMENGINE_PINYIN_SHUANG_PIN_SCHEME),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:1347: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.
    PinyinKeyExactEqualTo equal;
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:1383:18:  [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 (!equal (m_parsed_keys [len], old_parsed_keys [len]))
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:1430:35:  [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.
            PinyinKeyExactEqualTo equal;
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine.cpp:1433:22:  [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 (!equal (m_parsed_keys [len], old_parsed_keys [len]))
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1180: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_PINYIN_AUTO_COMBINE_PHRASE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1183: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_PINYIN_AUTO_FILL_PREEDIT),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1186: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_PINYIN_MATCH_LONGER_PHRASE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1189: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_PINYIN_ALWAYS_SHOW_LOOKUP),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1192: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_PINYIN_SHOW_ALL_KEYS),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1195: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_PINYIN_DYNAMIC_ADJUST),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1198: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_PINYIN_USER_DATA_BINARY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1201: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_PINYIN_MAX_USER_PHRASE_LENGTH),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1204: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_PINYIN_MAX_PREEDIT_LENGTH),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1207: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_PINYIN_SMART_MATCH_LEVEL),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1210: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_PINYIN_BURST_STACK_SIZE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1213: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_PINYIN_DYNAMIC_SENSITIVITY),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1216: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_PINYIN_SAVE_PERIOD),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1221: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),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1226: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_PINYIN_TONE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1230: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_PINYIN_INCOMPLETE),
data/scim-pinyin-0.5.92/src/scim_pinyin_imengine_setup.cpp:1235:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                config->read (__ambiguity_config_keys [i], __config_ambiguities [i]);
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:126:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		std::strlen (scim_pinyin_lib_text_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:130:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		std::strlen (scim_pinyin_lib_binary_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:137: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).
	if (std::strncmp (header, scim_pinyin_lib_version, std::strlen (scim_pinyin_lib_version)) != 0)
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:146:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		is.read ((char*) bytes, sizeof(unsigned char) * 4);
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:276:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		std::strlen (scim_pinyin_phrase_idx_lib_text_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:280:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		std::strlen (scim_pinyin_phrase_idx_lib_binary_header)) == 0) {
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:288: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).
					std::strlen (scim_pinyin_phrase_idx_lib_version)) != 0)
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:296:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		is.read ((char*) bytes, sizeof(unsigned char) * 4);
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.cpp:309:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			is.read ((char*) bytes, sizeof(unsigned char) * 8);
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.h:521:36:  [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.
								   const PinyinKeyEqualTo &equal,
data/scim-pinyin-0.5.92/src/scim_pinyin_phrase.h:523: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.
		: m_lib (lib), m_equal (equal), m_pos (pos) { }

ANALYSIS SUMMARY:

Hits = 134
Lines analyzed = 14133 in approximately 0.33 seconds (42807 lines/second)
Physical Source Lines of Code (SLOC) = 10723
Hits@level = [0]   6 [1]  87 [2]  45 [3]   0 [4]   2 [5]   0
Hits@level+ = [0+] 140 [1+] 134 [2+]  47 [3+]   2 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 13.056 [1+] 12.4965 [2+] 4.3831 [3+] 0.186515 [4+] 0.186515 [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.