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/libchewing-0.5.1/include/internal/memory-private.h
Examining data/libchewing-0.5.1/include/internal/chewing-private.h
Examining data/libchewing-0.5.1/include/internal/chewingutil.h
Examining data/libchewing-0.5.1/include/internal/pinyin-private.h
Examining data/libchewing-0.5.1/include/internal/hash-private.h
Examining data/libchewing-0.5.1/include/internal/choice-private.h
Examining data/libchewing-0.5.1/include/internal/key2pho-private.h
Examining data/libchewing-0.5.1/include/internal/chewing-sql.h
Examining data/libchewing-0.5.1/include/internal/bopomofo-private.h
Examining data/libchewing-0.5.1/include/internal/global-private.h
Examining data/libchewing-0.5.1/include/internal/userphrase-private.h
Examining data/libchewing-0.5.1/include/internal/chewing-utf8-util.h
Examining data/libchewing-0.5.1/include/internal/dict-private.h
Examining data/libchewing-0.5.1/include/internal/tree-private.h
Examining data/libchewing-0.5.1/include/global.h
Examining data/libchewing-0.5.1/include/chewingio.h
Examining data/libchewing-0.5.1/include/chewing.h
Examining data/libchewing-0.5.1/include/mod_aux.h
Examining data/libchewing-0.5.1/include/chewing-compat.h
Examining data/libchewing-0.5.1/contrib/simple-select.c
Examining data/libchewing-0.5.1/src/dict.c
Examining data/libchewing-0.5.1/src/porting_layer/include/plat_mmap.h
Examining data/libchewing-0.5.1/src/porting_layer/include/plat_path.h
Examining data/libchewing-0.5.1/src/porting_layer/include/plat_types.h
Examining data/libchewing-0.5.1/src/porting_layer/include/sys/plat_posix.h
Examining data/libchewing-0.5.1/src/porting_layer/include/sys/plat_windows.h
Examining data/libchewing-0.5.1/src/porting_layer/src/plat_mmap_posix.c
Examining data/libchewing-0.5.1/src/porting_layer/src/plat_path.c
Examining data/libchewing-0.5.1/src/porting_layer/src/rpl_malloc.c
Examining data/libchewing-0.5.1/src/porting_layer/src/plat_mmap_windows.c
Examining data/libchewing-0.5.1/src/common/key2pho.c
Examining data/libchewing-0.5.1/src/common/chewing-utf8-util.c
Examining data/libchewing-0.5.1/src/compat.c
Examining data/libchewing-0.5.1/src/pinyin.c
Examining data/libchewing-0.5.1/src/chewing-sql.c
Examining data/libchewing-0.5.1/src/hash.c
Examining data/libchewing-0.5.1/src/tree.c
Examining data/libchewing-0.5.1/src/mod_aux.c
Examining data/libchewing-0.5.1/src/tools/dump_database.c
Examining data/libchewing-0.5.1/src/tools/init_database.c
Examining data/libchewing-0.5.1/src/bopomofo.c
Examining data/libchewing-0.5.1/src/chewingio.c
Examining data/libchewing-0.5.1/src/private.h
Examining data/libchewing-0.5.1/src/userphrase-sql.c
Examining data/libchewing-0.5.1/src/chewingutil.c
Examining data/libchewing-0.5.1/src/choice.c
Examining data/libchewing-0.5.1/src/userphrase-hash.c
Examining data/libchewing-0.5.1/src/userphrase.c
Examining data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c
Examining data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.h
Examining data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c
Examining data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h
Examining data/libchewing-0.5.1/test/test-bopomofo.c
Examining data/libchewing-0.5.1/test/test-keyboard.c
Examining data/libchewing-0.5.1/test/test-utf8.c
Examining data/libchewing-0.5.1/test/test-easy-symbol.c
Examining data/libchewing-0.5.1/test/test-special-symbol.c
Examining data/libchewing-0.5.1/test/test-userphrase.c
Examining data/libchewing-0.5.1/test/test-config.c
Examining data/libchewing-0.5.1/test/genkeystroke.c
Examining data/libchewing-0.5.1/test/performance.c
Examining data/libchewing-0.5.1/test/stress.c
Examining data/libchewing-0.5.1/test/test-key2pho.c
Examining data/libchewing-0.5.1/test/test-struct-size.c
Examining data/libchewing-0.5.1/test/testhelper.h
Examining data/libchewing-0.5.1/test/test-keyboardless.c
Examining data/libchewing-0.5.1/test/test-logger.c
Examining data/libchewing-0.5.1/test/testchewing.c
Examining data/libchewing-0.5.1/test/test-path.c
Examining data/libchewing-0.5.1/test/test-reset.c
Examining data/libchewing-0.5.1/test/simulate.c
Examining data/libchewing-0.5.1/test/test-regression.c
Examining data/libchewing-0.5.1/test/test-symbol.c
Examining data/libchewing-0.5.1/test/test-fullshape.c
Examining data/libchewing-0.5.1/test/randkeystroke.c
Examining data/libchewing-0.5.1/test/testhelper.c
Examining data/libchewing-0.5.1/test/test-error-handling.c
Examining data/libchewing-0.5.1/test/test-mmap.c

FINAL RESULTS:

data/libchewing-0.5.1/src/bopomofo.c:609:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(pBopomofo->pinYinData.keySeq, buf);
data/libchewing-0.5.1/src/chewingutil.c:126:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(pci->totalChoiceStr[pci->nTotalChoice], pgdata->static_data.symbol_table[i]->category);
data/libchewing-0.5.1/src/chewingutil.c:445:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(pos, pgdata->preeditBuf[i].char_);
data/libchewing-0.5.1/src/chewingutil.c:862:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(pgo->bopomofoBuf, pgdata->bopomofoData.pinYinData.keySeq);
data/libchewing-0.5.1/src/chewingutil.c:952:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pgdata->selectStr[i], pgdata->selectStr[pgdata->nSelect]);
data/libchewing-0.5.1/src/common/key2pho.c:170:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(buffer, tmp);
data/libchewing-0.5.1/src/hash.c:155:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(str, "%s ", pItem->data.wordSeq);
data/libchewing-0.5.1/src/hash.c:159:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(str, buf);
data/libchewing-0.5.1/src/hash.c:163:5:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
    strcat(str, buf);
data/libchewing-0.5.1/src/hash.c:197:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy((pc + 1), pItem->data.wordSeq);
data/libchewing-0.5.1/src/hash.c:291:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pItem->data.wordSeq, (char *) (pc + 1));
data/libchewing-0.5.1/src/hash.c:330:9:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    if (fscanf(infile, "%s", wordbuf) != 1)
data/libchewing-0.5.1/src/hash.c:341:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(pItem->data.wordSeq, wordbuf);
data/libchewing-0.5.1/src/pinyin.c:36:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(filename, "%s" PLAT_SEPARATOR "%s", prefix, PINYIN_TAB_NAME);
data/libchewing-0.5.1/src/pinyin.c:50:15:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        ret = fscanf(fd, "%s %s",
data/libchewing-0.5.1/src/pinyin.c:64:15:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
        ret = fscanf(fd, "%s %s",
data/libchewing-0.5.1/src/pinyin.c:192:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(s, seq);
data/libchewing-0.5.1/src/pinyin.c:194:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(bopomofoKeySeq, initial);
data/libchewing-0.5.1/src/pinyin.c:196:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(bopomofoKeySeqAlt, initial);
data/libchewing-0.5.1/src/pinyin.c:304:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(bopomofoKeySeq, "%s%s", initial, final);
data/libchewing-0.5.1/src/pinyin.c:305:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(bopomofoKeySeqAlt, bopomofoKeySeq);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:39:13:  [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.
            snprintf(path, path_len,
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:136:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(NULL, 0, fmt, ap);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:144:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buf, len + 1, fmt, ap);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:165: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(output, R_OK) != 0)
data/libchewing-0.5.1/src/tools/dump_database.c:122:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        printf(USAGE, argv[0]);
data/libchewing-0.5.1/src/tools/init_database.c:411:5:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
    sscanf(buf, UTF8_FORMAT_STRING(BOPOMOFO_SIZE, MAX_UTF8_SIZE), key_buf, word_data[num_word_data].text->phrase);
data/libchewing-0.5.1/src/tools/init_database.c:694:9:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        printf(USAGE, argv[0]);
data/libchewing-0.5.1/src/userphrase-hash.c:146:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(data.wordSeq, wordSeq);
data/libchewing-0.5.1/src/userphrase.c:80:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(path + len - 1, "\\" USERPHRASE_DIR);
data/libchewing-0.5.1/src/userphrase.c:173:16:  [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 (tmp && access(tmp, W_OK) == 0) {
data/libchewing-0.5.1/test/genkeystroke.c:265:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(fd, fmt, ap);
data/libchewing-0.5.1/test/simulate.c:25:14:  [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 (0 == access(FN_MATERIALS "-random", R_OK))
data/libchewing-0.5.1/test/simulate.c:67:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
        strcpy(expect_string_buf, pos);
data/libchewing-0.5.1/test/testchewing.c:49:9:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
        strcat(commit_string_buf, s);
data/libchewing-0.5.1/test/testhelper.c:270: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, ap);
data/libchewing-0.5.1/test/testhelper.c:278: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, ap);
data/libchewing-0.5.1/test/testhelper.c:474:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf(fd, fmt, ap);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:65: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.
#define access(f,m) _access((f),(m))
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:66:8:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#undef popen
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:67:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define popen _popen
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:78:7:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
FILE *popen(const char*,const char*);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1927:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(p->out, p->nErr ? "ROLLBACK; -- due to errors\n" : "COMMIT;\n");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2015:17:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      sCsv.in = popen(sCsv.zFile+1, "r");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2279:16:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      p->out = popen(&azArg[1][1], "w");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2738:5:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    fprintf(p->out, "SQLite %s %s\n" /*extra-version-info*/,
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:3243:7:  [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(data.zDbFilename, 0)==0 ){
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:23418:42:  [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",       (sqlite3_syscall_ptr)access,     0  },
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:38451:28:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define sqlite3DebugPrintf printf
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:49610:42:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
# define TRACE(X)  if(sqlite3BtreeTrace){printf X;fflush(stdout);}
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:61049:3:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  fprintf(pOut, zFormat1, pc, 
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92637:12:  [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.
  char * (*snprintf)(int,char*,const char*,...);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92749:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  char *(*vsnprintf)(int,char*,const char*,va_list);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92867:53:  [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.
#define sqlite3_snprintf               sqlite3_api->snprintf
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92966:53:  [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.
#define sqlite3_uri_vsnprintf          sqlite3_api->vsnprintf
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h:139:12:  [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.
  char * (*snprintf)(int,char*,const char*,...);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h:251:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  char *(*vsnprintf)(int,char*,const char*,va_list);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h:369:53:  [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.
#define sqlite3_snprintf               sqlite3_api->snprintf
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h:468:53:  [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.
#define sqlite3_uri_vsnprintf          sqlite3_api->vsnprintf
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:33:20:  [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.
    chewing_path = getenv("CHEWING_PATH");
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:37:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        home = getenv("HOME");
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:61:20:  [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.
    chewing_path = getenv("CHEWING_PATH");
data/libchewing-0.5.1/src/userphrase.c:138:11:  [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.
    tmp = getenv("CHEWING_USER_PATH");
data/libchewing-0.5.1/src/userphrase.c:148:11:  [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.
    tmp = getenv("HOME");
data/libchewing-0.5.1/test/randkeystroke.c:59:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(time(NULL));
data/libchewing-0.5.1/test/randkeystroke.c:69:17:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
                srand(atoi(argv[i]));
data/libchewing-0.5.1/test/stress.c:245:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("AFL_PERSISTENT"))
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:162:28:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
      HINSTANCE hinstLib = LoadLibrary(TEXT("Kernel32.dll"));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2979:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    home_dir = getenv("USERPROFILE");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2984:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    home_dir = getenv("HOME");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2991:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    zDrive = getenv("HOMEDRIVE");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2992:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    zPath = getenv("HOMEPATH");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:18538:7:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
      InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:18622:9:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
        InitializeCriticalSection(&p->mutex);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:18671:3:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
  EnterCriticalSection(&p->mutex);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:25866:10:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    lk = random(); 
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28376: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.
  if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28790: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 *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:89120:14:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    FUNCTION(random,             0, 0, 0, randomFunc       ),
data/libchewing-0.5.1/include/internal/chewing-private.h:107: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/libchewing-0.5.1/include/internal/chewing-private.h:110:22:  [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 begin[3];
data/libchewing-0.5.1/include/internal/chewing-private.h:111:22:  [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 end[3];
data/libchewing-0.5.1/include/internal/chewing-private.h:114:22:  [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 pos[3];
data/libchewing-0.5.1/include/internal/chewing-private.h:115:22:  [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 freq[3];
data/libchewing-0.5.1/include/internal/chewing-private.h:128: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 keySeq[PINYIN_SIZE];
data/libchewing-0.5.1/include/internal/chewing-private.h: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 totalChoiceStr[MAX_CHOICE][MAX_PHRASE_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:186: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 category[MAX_PHRASE_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:214: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 hashfilename[200];
data/libchewing-0.5.1/include/internal/chewing-private.h:222: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 *g_easy_symbol_value[EASY_SYMBOL_KEY_TAB_LEN];
data/libchewing-0.5.1/include/internal/chewing-private.h:239:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char char_[MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:256: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 showMsg[MAX_UTF8_SIZE * (MAX_PHRASE_LEN + AUX_PREFIX_LEN) + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:262: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 selectStr[MAX_PHONE_SEQ_LEN][MAX_PHONE_SEQ_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:274: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 symbolKeyBuf[MAX_PHONE_SEQ_LEN];
data/libchewing-0.5.1/include/internal/chewing-private.h:294: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 preeditBuf[MAX_PHONE_SEQ_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:301: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 bopomofoBuf[BOPOMOFO_SIZE * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:309: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 commitBuf[MAX_PHONE_SEQ_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-private.h:335: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 phrase[MAX_PHRASE_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/include/internal/chewing-sql.h:78: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 column[COLUMN_USERPHRASE_COUNT];
data/libchewing-0.5.1/include/internal/chewing-sql.h:109: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 column[COLUMN_CONFIG_COUNT];
data/libchewing-0.5.1/include/internal/pinyin-private.h:27:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char pinyin[7];
data/libchewing-0.5.1/include/internal/pinyin-private.h:28:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char bopomofo[4];
data/libchewing-0.5.1/src/bopomofo.c:537: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 bopomofoKeySeq[5], bopomofoKeySeqAlt[5], buf[2];
data/libchewing-0.5.1/src/chewing-sql.c:336: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[HASH_FIELD_SIZE];
data/libchewing-0.5.1/src/chewing-sql.c:380:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(uhash, "r");
data/libchewing-0.5.1/src/chewingio.c:169: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 search_path[PATH_MAX + 1] = {0};
data/libchewing-0.5.1/src/chewingio.c:170:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char path[PATH_MAX];
data/libchewing-0.5.1/src/chewingio.c:487: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(ctx->data->config.selKey, selkeys, sizeof(*selkeys) * len);
data/libchewing-0.5.1/src/chewingio.c:505: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(selkeys, ctx->data->config.selKey, sizeof(*selkeys) * MAX_SELKEY);
data/libchewing-0.5.1/src/chewingio.c:1639: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 addWordSeq[MAX_PHONE_SEQ_LEN * MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/src/chewingio.c:1674:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(addPhoneSeq, &pgdata->phoneSeq[cursor], sizeof(uint16_t) * newPhraseLen);
data/libchewing-0.5.1/src/chewingio.c:1691:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                memcpy(addPhoneSeq, &pgdata->phoneSeq[cursor - newPhraseLen], sizeof(uint16_t) * newPhraseLen);
data/libchewing-0.5.1/src/chewingio.c:1807: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(seq, ctx->data->phoneSeq, sizeof(uint16_t) * ctx->data->nPhoneSeq);
data/libchewing-0.5.1/src/chewingutil.c:54: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 G_EASY_SYMBOL_KEY[EASY_SYMBOL_KEY_TAB_LEN] = {
data/libchewing-0.5.1/src/chewingutil.c:287: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 wordbuf[8];
data/libchewing-0.5.1/src/chewingutil.c:573: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 bufWordSeq[MAX_PHONE_SEQ_LEN * MAX_UTF8_SIZE + 1] = { 0 };
data/libchewing-0.5.1/src/chewingutil.c:614: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(bufPhoneSeq + prev_pos, &pgdata->phoneSeq[from], sizeof(uint16_t) * len);
data/libchewing-0.5.1/src/chewingutil.c:632: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(bufPhoneSeq, &pgdata->phoneSeq[from], sizeof(uint16_t) * len);
data/libchewing-0.5.1/src/chewingutil.c:724:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pgdata->bArrBrkpt, pgdata->bUserArrBrkpt, (MAX_PHONE_SEQ_LEN + 1) * sizeof(int));
data/libchewing-0.5.1/src/chewingutil.c:875:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pgo->dispBrkpt, pgdata->bUserArrBrkpt, sizeof(pgo->dispBrkpt[0]) * (MAX_PHONE_SEQ_LEN + 1));
data/libchewing-0.5.1/src/chewingutil.c:878:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pgo->selKey, pgdata->config.selKey, sizeof(pgdata->config.selKey));
data/libchewing-0.5.1/src/chewingutil.c:1274:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(filename, "r");
data/libchewing-0.5.1/src/chewingutil.c:1337:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pgdata->static_data.symbol_table, entry, size);
data/libchewing-0.5.1/src/chewingutil.c:1383:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    file = fopen(filename, "r");
data/libchewing-0.5.1/src/chewingutil.c:1463: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(output, pgdata->preeditBuf[i].char_, x);
data/libchewing-0.5.1/src/choice.c:137: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(userPhoneSeq, &phoneSeq[head_tmp], sizeof(uint16_t) * (diff + 1));
data/libchewing-0.5.1/src/choice.c:181: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(pci->totalChoiceStr[pci->nTotalChoice], tempWord.phrase, len);
data/libchewing-0.5.1/src/choice.c:288: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(userPhoneSeq, &phoneSeq[cursor], sizeof(uint16_t) * len);
data/libchewing-0.5.1/src/choice.c:489:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(userPhoneSeq, &(pgdata->phoneSeq[PhoneSeqCursor(pgdata)]), len * sizeof(uint16_t));
data/libchewing-0.5.1/src/common/chewing-utf8-util.c:16: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 utf8len_tab[256] = {
data/libchewing-0.5.1/src/common/chewing-utf8-util.c:64:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dest, src, len);
data/libchewing-0.5.1/src/common/key2pho.c:72: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 *const key_str[KBTYPE_COUNT] = {
data/libchewing-0.5.1/src/common/key2pho.c:97:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/src/common/key2pho.c:160:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp[MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/src/common/key2pho.c:161:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1] = { 0 };
data/libchewing-0.5.1/src/common/key2pho.c:180: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 keyStr[2];
data/libchewing-0.5.1/src/common/key2pho.c:181: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 rtStr[10];
data/libchewing-0.5.1/src/dict.c:37:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char filename[PATH_MAX];
data/libchewing-0.5.1/src/hash.c:122:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&(pItem->data), pData, sizeof(pItem->data));
data/libchewing-0.5.1/src/hash.c:153: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[FIELD_SIZE];
data/libchewing-0.5.1/src/hash.c:158:9:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
        sprintf(buf, "%hu ", pItem->data.phoneSeq[i]);
data/libchewing-0.5.1/src/hash.c:161: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(buf, "%d %d %d %d",
data/libchewing-0.5.1/src/hash.c:204: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[FIELD_SIZE + 1];
data/libchewing-0.5.1/src/hash.c:206:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    outfile = fopen(pgdata->static_data.hashfilename, "r+b");
data/libchewing-0.5.1/src/hash.c:213: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(str, "%d", pgdata->static_data.chewing_lifetime);
data/libchewing-0.5.1/src/hash.c:327: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 wordbuf[64];
data/libchewing-0.5.1/src/hash.c:366:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *tf = fopen(filename, otype);
data/libchewing-0.5.1/src/hash.c:414: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 oldname[256], *dump, *seekdump;
data/libchewing-0.5.1/src/hash.c:438:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(seekdump, BIN_HASH_SIG, strlen(BIN_HASH_SIG));
data/libchewing-0.5.1/src/hash.c:439:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(seekdump + strlen(BIN_HASH_SIG),
data/libchewing-0.5.1/src/hash.c:468:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    txtfile = fopen(ofilename, "w+b");
data/libchewing-0.5.1/src/hash.c:516: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).
        outfile = fopen(pgdata->static_data.hashfilename, "w+b");
data/libchewing-0.5.1/src/hash.c:554: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(pItem, &item, sizeof(HASH_ITEM));
data/libchewing-0.5.1/src/pinyin.c:31: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 filename[PATH_MAX];
data/libchewing-0.5.1/src/pinyin.c:38:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(filename, "r");
data/libchewing-0.5.1/src/pinyin.c:190: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 s[BOPOMOFO_SIZE * 2 + 1];
data/libchewing-0.5.1/src/porting_layer/src/plat_mmap_posix.c:59: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).
        handle->fd = open(file, O_RDONLY);
data/libchewing-0.5.1/src/porting_layer/src/plat_mmap_posix.c: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).
        handle->fd = open(file, O_RDWR);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:176: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[PATH_MAX + 1] = {0};
data/libchewing-0.5.1/src/tools/dump_database.c:64:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char buf[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/src/tools/dump_database.c:83: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 filename[PATH_MAX];
data/libchewing-0.5.1/src/tools/dump_database.c:127:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    dict = (const char *) read_input(argv[1], DICT_FILE, &dict_mmap);
data/libchewing-0.5.1/src/tools/init_database.c:61: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 phrase[MAX_PHRASE_BUF_LEN];
data/libchewing-0.5.1/src/tools/init_database.c:119:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char word_matched[MAX_WORD_DATA];
data/libchewing-0.5.1/src/tools/init_database.c:194:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char word[MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/src/tools/init_database.c:224: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 previous[MAX_UTF8_SIZE + 1];
data/libchewing-0.5.1/src/tools/init_database.c:241: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[MAX_LINE_LEN];
data/libchewing-0.5.1/src/tools/init_database.c:246: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 bopomofo_buf[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/src/tools/init_database.c:368: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[MAX_LINE_LEN];
data/libchewing-0.5.1/src/tools/init_database.c:371:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    tsi_src = fopen(filename, "r");
data/libchewing-0.5.1/src/tools/init_database.c:388: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 phone_buf[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/src/tools/init_database.c:389: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_buf[BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/src/tools/init_database.c:390: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[MAX_LINE_LEN + 1] = {0};
data/libchewing-0.5.1/src/tools/init_database.c:427: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[MAX_LINE_LEN];
data/libchewing-0.5.1/src/tools/init_database.c:432:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    phone_cin = fopen(filename, "r");
data/libchewing-0.5.1/src/tools/init_database.c:590:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    dict_file = fopen(DICT_FILE, "wb");
data/libchewing-0.5.1/src/tools/init_database.c:640:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *output = fopen(PHONE_TREE_FILE, "wb");
data/libchewing-0.5.1/src/tree.c:52:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char graph[MAX_PHONE_SEQ_LEN + 1][MAX_PHONE_SEQ_LEN + 1];
data/libchewing-0.5.1/src/tree.c:88: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 filename[PATH_MAX];
data/libchewing-0.5.1/src/tree.c:335: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(new_phoneSeq, &pgdata->phoneSeq[begin], sizeof(uint16_t) * (end - begin + 1));
data/libchewing-0.5.1/src/tree.c:438: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 failflag[INTERVAL_SIZE];
data/libchewing-0.5.1/src/tree.c:504: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 overwrite[MAX_PHONE_SEQ_LEN];
data/libchewing-0.5.1/src/tree.c:505: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 failflag[INTERVAL_SIZE];
data/libchewing-0.5.1/src/tree.c:707:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(now->arrIndex, record, nInter * sizeof(int));
data/libchewing-0.5.1/src/tree.c:874:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(ret->arrIndex, record->arrIndex, sizeof(record->arrIndex[0]) * record->nInter);
data/libchewing-0.5.1/src/userphrase-hash.c:110:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[7 * MAX_PHRASE_LEN + 1] = { 0 };
data/libchewing-0.5.1/src/userphrase-hash.c:144: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(data.phoneSeq, phoneSeq, len * sizeof(phoneSeq[0]));
data/libchewing-0.5.1/src/userphrase-sql.c:169: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[7 * MAX_PHRASE_LEN + 1] = { 0 };
data/libchewing-0.5.1/test/genkeystroke.c:106:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char out_buf[100];
data/libchewing-0.5.1/test/genkeystroke.c:204: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[20];
data/libchewing-0.5.1/test/genkeystroke.c:281:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fout = fopen(argv[1], "w");
data/libchewing-0.5.1/test/genkeystroke.c:288:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    log = fopen(LOGNAME, "w");
data/libchewing-0.5.1/test/randkeystroke.c:64:22:  [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).
                nk = atoi(argv[i]);
data/libchewing-0.5.1/test/randkeystroke.c:69: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).
                srand(atoi(argv[i]));
data/libchewing-0.5.1/test/simulate.c:26:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(FN_MATERIALS "-random", "r");
data/libchewing-0.5.1/test/simulate.c:28:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        fp = fopen(FN_MATERIALS, "r");
data/libchewing-0.5.1/test/simulate.c:40:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char linebuf[MAXLEN];
data/libchewing-0.5.1/test/stress.c:122: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).
	    flag_loop = atoi(argv[++i]);
data/libchewing-0.5.1/test/test-bopomofo.c:1705:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-config.c:558:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-easy-symbol.c:111:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-error-handling.c:343:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-fullshape.c:158:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-key2pho.c:27: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 rt[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/test/test-key2pho.c:63:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char rt[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/test/test-key2pho.c:91: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 rt[MAX_UTF8_SIZE * BOPOMOFO_SIZE + 1];
data/libchewing-0.5.1/test/test-key2pho.c:122:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-keyboard.c:181:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-keyboardless.c:930:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-logger.c:49:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-mmap.c:66:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-path.c:42: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 output[PATH_MAX];
data/libchewing-0.5.1/test/test-path.c:56:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char output[PATH_MAX];
data/libchewing-0.5.1/test/test-path.c:70: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 output[PATH_MAX];
data/libchewing-0.5.1/test/test-path.c:91:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-regression.c:137:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-reset.c:55:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-special-symbol.c:184:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-symbol.c:431:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-userphrase.c:320: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 phrase_buf[50];
data/libchewing-0.5.1/test/test-userphrase.c:324: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 bopomofo_buf[50];
data/libchewing-0.5.1/test/test-userphrase.c:394: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 phrase_buf[50];
data/libchewing-0.5.1/test/test-userphrase.c:398: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 bopomofo_buf[50];
data/libchewing-0.5.1/test/test-userphrase.c:738:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/test-utf8.c:25:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char u8string2[16];
data/libchewing-0.5.1/test/test-utf8.c:65:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = fopen(logname, "w");
data/libchewing-0.5.1/test/testchewing.c:20:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char commit_string_buf[MAXLEN];
data/libchewing-0.5.1/test/testchewing.c:21:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char expect_string_buf[MAXLEN];
data/libchewing-0.5.1/test/testchewing.c:61: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 utf8buf_expect[16];
data/libchewing-0.5.1/test/testchewing.c:62:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char utf8buf_commit[16];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:254:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char mainPrompt[20];     /* First line prompt. default: "sqlite> "*/
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:255:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char continuePrompt[20]; /* Continuation prompt. default: "   ...> " */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:429: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 separator[20];    /* Separator character for MODE_List */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:432: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 nullvalue[20];    /* The text to print when a NULL comes back from
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:437: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 outfile[FILENAME_MAX]; /* Filename for *out */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:946:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zIn[nIn], zAppend, nAppend);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1018:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zErrMsg, sqlite3_errmsg(db), nErrMsg);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1631:9:  [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).
    f = fopen(zFile, "wb");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1766: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 *azArg[50];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1946: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->explainPrev.colWidth,p->colWidth,sizeof(p->colWidth));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2019:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      sCsv.in = fopen(sCsv.zFile, "rb");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2187:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      iotrace = fopen(azArg[1], "w");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2324:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *alt = fopen(azArg[1], "rb");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2392: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 *new_argv[2], *new_colv[2];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2406: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 *new_argv[2], *new_colv[2];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2469: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 zBuf[200];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2890:7:  [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(zLine,";",2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2906:7:  [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(zSql, zLine+i, nLine+1-i);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2911:7:  [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(zSql+nSql, zLine, nLine+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2922: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 zPrefix[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:3009: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.
    if( z ) memcpy(z, home_dir, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:3044:8:  [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).
  in = fopen(sqliterc,"rb");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:3108:3:  [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->separator,"|", 2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:3277:7:  [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.separator,",",2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:12661:31:  [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.
SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:13509: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 zBase[100];   /* Initial space */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:14507: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 *z, zBuf[30];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:14773: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 zBuf[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:14793: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 zBuf[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:14812: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 zBuf[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:14849: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 zBuf[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:15035: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 zBuf[20];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16003: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 zTitle[100];  /* The title text */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16173:7:  [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(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16182:7:  [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(z, mem.zTitle, mem.nTitle);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16249:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pNew, pPrior, nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16355:3:  [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(mem.zTitle, zTitle, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16379:9:  [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).
  out = fopen(zFilename, "w");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16967:7:  [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, pPrior, nOld);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:16969:7:  [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, pPrior, nBytes);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:17025:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(zFilename, "w");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:17527:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, pPrior, nOld);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:17649:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out = fopen(zFilename, "w");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:17748:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pTo, pFrom, offsetof(sqlite3_mutex_methods, xMutexAlloc));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:17749:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pTo->xMutexFree, &pFrom->xMutexFree,
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:19433: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(pNew, p, db->lookaside.sz);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:19482:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zNew, z, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:19494:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zNew, z, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:19743: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[etBUFSIZE];       /* Conversion buffer */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20266:37:  [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( zOld==0 && p->nChar>0 ) memcpy(zNew, p->zText, p->nChar);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20276:3:  [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->zText[p->nChar], z, N);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20295: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->zText, p->zBase, p->nChar+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20337: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 zBase[SQLITE_PRINT_BUF_SIZE];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20388: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 zBase[SQLITE_PRINT_BUF_SIZE];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20457: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 zMsg[SQLITE_PRINT_BUF_SIZE*3];    /* Complete log message */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20487: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 zBuf[500];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20538: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 s[256];          /* State variables */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20577: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 k[256];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20617:3:  [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/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20624:3:  [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/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20852: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 zBuf[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:20961: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 zBuf[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:21145: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 zBuf[20];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:23105: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 aPadding[32];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:23386:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  return open(zFile, flags, mode);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:23940:3:  [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(pNew->zCanonicalName, zAbsoluteName, n+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:24118: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 aSemName[MAX_PATHNAME+2];  /* Name of that semaphore */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:24158: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 aErr[80];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:24338:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pInode->fileId, &fileId, sizeof(fileId));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26221:7:  [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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26225:7:  [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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26339:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char oldCntr[4];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26355:7:  [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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26359:7:  [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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26537: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 zDirname[MAX_PATHNAME+1];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28529: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 zDb[MAX_PATHNAME+1];     /* Database file path */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28556:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zDb, zPath, nDb);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28634: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 zTmpname[MAX_PATHNAME+2];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28796: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).
      useProxy = atoi(envforce)>0;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29057:7:  [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(zBuf, &t, sizeof(t));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29059:7:  [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(&zBuf[sizeof(t)], &pid, sizeof(pid));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29400: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[MAXPATHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29577: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 tPath[MAXPATHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29578: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[PROXY_MAXCONCHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29582: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 errmsg[64] = "";
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29671: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 tBuf[PROXY_MAXCONCHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29721: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 readBuf[PROXY_MAXCONCHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29722: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 lockPath[MAXPATHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29777: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(lockPath, &readBuf[PROXY_PATHINDEX], pathLen);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29823: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 writeBuffer[PROXY_MAXCONCHLEN];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29827: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(&writeBuffer[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29973:3:  [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(conchPath, dbPath, len+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29989:3:  [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(&conchPath[i+1], "-conch", 7);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:30048:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dbPath, (char *)pFile->lockingContext, len + 1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:30067: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 dbPath[MAXPATHLEN+1];       /* Name of the database file */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:31385:41:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
  { "MultiByteToWideChar",     (SYSCALL)MultiByteToWideChar,     0 },
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:31673: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 zDbgBuf[SQLITE_WIN32_DBG_BUF_SIZE];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:31680:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zDbgBuf, zBuf, nMin);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:31696:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zDbgBuf, zBuf, nMin);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:32231: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 zMsg[500];                 /* Human readable error text */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:32842:7:  [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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], amt);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:32847:7:  [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(pBuf, &((u8 *)(pFile->pMapRegion))[offset], nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:32914:7:  [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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, amt);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:32919:7:  [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(&((u8 *)(pFile->pMapRegion))[offset], pBuf, nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:34568: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 zTempPath[SQLITE_WIN32_MAX_PATH+2];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:34600: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 zMbcsPath[SQLITE_WIN32_MAX_PATH];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:34717: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 zTmpname[SQLITE_WIN32_MAX_PATH+2];     /* Buffer used to create temp filename */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35223: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 zOut[SQLITE_WIN32_MAX_PATH+1];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35424:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuf[n], &x, sizeof(x));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35429:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuf[n], &pid, sizeof(pid));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35435:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuf[n], &cnt, sizeof(cnt));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35441:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuf[n], &cnt, sizeof(cnt));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35448:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuf[n], &i, sizeof(i));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35844:7:  [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(aiValues, p->u.aHash, sizeof(p->u.aHash));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:35884:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:38999: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 dbFileVers[16];        /* Changes whenever database file changes */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39308:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char zRet[1024];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39390: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 ac[4];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39409: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 ac[4];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39579: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 aMagic[8];   /* A buffer to hold the magic header */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39669:20:  [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 zeroHdr[28] = {0};
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39757:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:39834: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 aMagic[8];     /* A buffer to hold the magic header */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:40662:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pData, (u8*)aData, pPager->pageSize);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42445: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(zHeader, aJournalMagic, sizeof(aJournalMagic));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42977:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pPager->zFilename, zPathname, nPathname);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42978:16:  [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( nUri ) memcpy(&pPager->zFilename[nPathname+1], zUri, nUri);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42979:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pPager->zJournal, zPathname, nPathname);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42980:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pPager->zJournal[nPathname], "-journal\000", 8+2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42984:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pPager->zWal, zPathname, nPathname);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:42985:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pPager->zWal[nPathname], "-wal\000", 4+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:43441:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char dbFileVers[sizeof(pPager->dbFileVers)];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:44291:54:  [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 void *pCopy = (const void *)&((const char *)zBuf)[24];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:46175:3:  [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((void *)&aHdr[1], (void *)&pWal->hdr, sizeof(WalIndexHdr));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:46177:3:  [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((void *)&aHdr[0], (void *)&pWal->hdr, sizeof(WalIndexHdr));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:46205:3:  [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(&aFrame[8], pWal->hdr.aSalt, 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:46283: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.
    static char zName[15];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:46651:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pWal->hdr.aSalt, &aBuf[16], 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:46951:3:  [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(aLeft, aTmp, sizeof(aTmp[0])*iOut);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:47461:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pWal->hdr, &h1, sizeof(WalIndexHdr));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:48030:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:48292:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&aWalHdr[16], pWal->hdr.aSalt, 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:50267: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 aSpace[150];          /* Temp space for pIdxKey - to avoid a malloc */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:50705:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(&temp[cbrk], &data[cbrk], usableSize - cbrk);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:50738:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data[cbrk], &temp[pc], size);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:50818: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.
          memcpy(&data[addr], &data[pc], 2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:50939:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data[hdr+1], &data[pbegin], 2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:51330: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 zDbHeader[100];  /* Database header content */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:51390: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(zFullPathname, zFilename, sqlite3Strlen30(zFilename)+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:52161:3:  [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, zMagicHeader, sizeof(zMagicHeader));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:53503:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pPayload, pBuf, nByte);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:53506:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pBuf, pPayload, nByte);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:53675: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.
          memcpy(aSave, aWrite, 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:53678: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.
          memcpy(aWrite, aSave, 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:54645: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(&pPage1->aData[32], &pTrunk->aData[0], 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:54669: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(&pPage1->aData[32], &pTrunk->aData[0], 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:54675: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(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:54698: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.
          memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:54700: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.
          memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:54765: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(&aData[8+closest*4], &aData[4+k*4], 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55207:7:  [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(pPayload, pSrc, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55325:7:  [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(pTemp+nSkip, pCell+nSkip, sz-nSkip);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55354:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data[idx+nSkip], pCell+nSkip, sz-nSkip);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55412:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&data[cellbody], apCell[i], sz);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55617:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&aTo[iData], &aFrom[iData], pBt->usableSize-iData);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55618:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55812: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.
          memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55868:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pOld, apOld[i], sizeof(MemPage));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55870:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pOld->aData, apOld[i]->aData, pBt->pageSize);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55900:7:  [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(pTemp, apDiv[i], sz);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:55909: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(apCell[nCell], &pOld->aData[8], 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:56118: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(&pNew->aData[8], pCell, 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:56165:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&apNew[nNew-1]->aData[8], zChild, 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:56371:3:  [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(pChild->aiOvfl, pRoot->aiOvfl,
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:56373:3:  [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(pChild->apOvfl, pRoot->apOvfl,
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:56617:7:  [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(newCell, oldCell, 4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:57514: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 zContext[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:57735: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 zErr[100];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:58376:7:  [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(zOut, zIn, nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:58937:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pMem->zMalloc, pMem->z, pMem->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:59101:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pMem, &ctx.s, sizeof(ctx.s));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:59465:3:  [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(pTo, pFrom, MEMCELLSIZE);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:59483:3:  [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(pTo, pFrom, MEMCELLSIZE);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:59508:3:  [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(pTo, pFrom, sizeof(Mem));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:59580:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pMem->z, z, nAlloc);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:60753:7:  [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(pNew->aColl, pOrig->aColl, pOrig->nField*sizeof(pNew->aColl[0]));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:60754:7:  [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(pNew->aSortOrder, pOrig->aSortOrder, pOrig->nField);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:60875: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.
          memcpy(&zTemp[i],",...",4);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:60882: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(&zTemp[i], zColl, n+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:61045: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 zPtr[50];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:61347: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 z[1000];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:61555:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->azVar, pParse->azVar, p->nzVar*sizeof(p->azVar[0]));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:62415:17:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE *out = fopen("vdbe_profile.out", "a");
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:62782:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(buf, pMem->z, len);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:62868: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(&pMem->r, &x, sizeof(x));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:64707: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 zBase[100];         /* Initial working space */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:65355: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 zBuf[200];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:65763:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:66678:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pOut->z, pIn2->z, pIn2->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:66680:3:  [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(&pOut->z[pIn2->n], pIn1->z, pIn1->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:68186: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(u.as.pNew->zName, u.as.zName, u.as.nName+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:69145: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 aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:72555:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->aAlloc, &p->aBuffer[iBuf], nAvail);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:72571:7:  [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->aAlloc[nByte - nRem], aNext, nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:72972:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&p->aBuffer[p->iBufEnd], &pData[nData-nRem], nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:73098:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pNew->pVal, pVal->z, pVal->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:73333:3:  [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(pOut->z, pKey, nKey);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:73464:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zBuf, &p->zBuf[iOfst], iAmt);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:73487:7:  [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->zBuf[iOfst], zBuf, iAmt);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:73716:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zOut, &pChunk->zChunk[iChunkOffset], nCopy);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:73768:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&p->endpoint.pChunk->zChunk[iChunkOffset], zWrite, iSpace);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:74159:3:  [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(pExpr, pDup, sizeof(*pExpr));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:75882:25:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        if( pToken->n ) memcpy(pNew->u.zToken, pToken->z, pToken->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:76282: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(zAlloc, p, nNewSize);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:76285: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(zAlloc, p, nSize);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:76297: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(zToken, p->u.zToken, nToken);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:77454:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(out, in, 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:80507:3:  [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(pNew->aCol, pTab->aCol, sizeof(Column)*pNew->nCol);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81573: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.
          memcpy(pSample->u.z, z, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81741: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.
  zFile = (const char *)sqlite3_value_text(argv[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81742: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.
  zName = (const char *)sqlite3_value_text(argv[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81777:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aNew, db->aDb, sizeof(db->aDb[0])*2);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81848:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        zKey = (char *)sqlite3_value_blob(argv[2]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81917: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.
  const char *zName = (const char *)sqlite3_value_text(argv[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:81921: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 zErr[128];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:82710: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 saveBuf[SAVE_SZ];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:82721:3:  [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(saveBuf, &pParse->nVar, SAVE_SZ);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:82726:3:  [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(&pParse->nVar, saveBuf, SAVE_SZ);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:82922:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:83947:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zStmt[k], zType, len);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:84502: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 zTab[24];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:84752:3:  [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(z, pTo->z, pTo->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:84780:7:  [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(z, pToCol->a[i].zName, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:85158:3:  [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(pIndex->zName, zName, nName+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:85212:7:  [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(zExtra, zColl, nColl);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:86361:7:  [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(pColl, pColl2, sizeof(CollSeq));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:86471:7:  [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(pColl[0].zName, zName, nName);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:86711:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pBest->zName, zName, nName);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:88357:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char zBuf[50];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:88603:7:  [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(&zOut[j], zRep, nRep);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:88609:3:  [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(&zOut[j], &zStr[i], nStr-i);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:88717: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 zResult[8];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:88766: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.
  const char *zFile = (const char *)sqlite3_value_text(argv[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:88772:20:  [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.
    zProc = (const char *)sqlite3_value_text(argv[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:89064:3:  [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(aWc, pDef->pUserData, 3);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:90293:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy((char *)pStep->target.z, zFrom, nFrom);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92464:7:  [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(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92613:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int  (*open)(const char*,sqlite3**);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:92842:53:  [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).
#define sqlite3_open                   sqlite3_api->open
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:93463:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zAltEntry, "sqlite3_", 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:93472:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zAltEntry+iEntry, "_init", 6);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:93507:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aHandle, db->aExtension, sizeof(handle)*db->nExtension);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:93881:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pI64, &value, sizeof(value));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:94080: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 *aFcntl[4];       /* Argument to SQLITE_FCNTL_PRAGMA */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:95536: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 zKey[40];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:95716: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 const *azArg[4];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:101390: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(z, argv[i], n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:101873:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(z, pName->z, pName->n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:103710:7:  [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(zCopy, zName, nName+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:104669:3:  [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(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:105296:3:  [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(pDest->a, pSrc->a, pDest->n*sizeof(pDest->a[0]));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:105429:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:105849: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 wc[3];                /* Wildcard characters */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:106754:3:  [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(&a, &x, 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:108522:7:  [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(pOrTab->a, pTabItem, sizeof(*pTabItem));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:108841:3:  [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(paNew, p->aLTerm, sizeof(p->aLTerm[0])*p->nLSlot);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:108854:3:  [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(pTo, pFrom, WHERE_LOOP_XFER_SZ);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:108855:3:  [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(pTo->aLTerm, pFrom->aLTerm, pTo->nLTerm*sizeof(pTo->aLTerm[0]));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:109993:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char zName[65];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:110184: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(pTo->aLoop, pFrom->aLoop, sizeof(WhereLoop*)*iLoop);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:114513:16:  [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 zText[540] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:114545:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aHash[127] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:114557:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aNext[121] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:114569:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aLen[121] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:114593:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static const unsigned char aCode[121] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:115846:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&y, &x, 8);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:116747: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.
    static char zBuf[50];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:117933:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zFile, zUri, nUri);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:119204: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.
          memcpy(pNew, aArg, nArg*sizeof(void *));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121153: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, zCol, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121449:3:  [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->aIndex, aIndex, sizeof(struct Fts3Index) * nIndex);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121459:3:  [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(zCsr, argv[2], nName);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121462:3:  [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(zCsr, argv[1], nDb);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121469:10:  [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.
    z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121470:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(zCsr, z, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121475:24:  [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.
    assert( zCsr <= &((char *)p)[nByte] );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121841:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&zBuffer[nPrefix], zCsr, nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121993:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, *ppPoslist, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:122031:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p, *ppPoslist, n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:122356: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 *aaOutput[16];             /* Malloc'd output buffers */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:122721:7:  [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(pTS->aaOutput[0], aDoclist, nDoclist);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:123141:33:  [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 *zQuery = (const char *)sqlite3_value_text(apVal[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:123415:3:  [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(&pRet, sqlite3_value_blob(pVal), sizeof(Fts3Cursor *));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:123534:21:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      zArg = (const char *)sqlite3_value_text(apVal[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:125634:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((char *)p->pFts3Tab->zDb, zDb, nDb);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:125635:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:126218: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(pRet->pPhrase->aToken[0].z, zToken, nToken);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:126332: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(&zTemp[nTemp], zByte, nByte);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:126360:7:  [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(zBuf, zTemp, nTemp);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127115:7:  [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((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127214: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.
                          (const char *)sqlite3_value_text(argv[0]), &pModule);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127231: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.
  zExpr = (const char *)sqlite3_value_text(argv[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127240: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.
    azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127662:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy((void*)new_elem->pKey, pKey, nKey);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128020: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 zReverse[28];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128576: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.
  const char *azArg[64];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128593: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.
  zName = (const char *)sqlite3_value_text(argv[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128595:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  zInput = (const char *)sqlite3_value_text(argv[argc-1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128611:25:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    azArg[i-1] = (const char *)sqlite3_value_text(argv[i]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128691:7:  [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((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128851: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 delim[128];             /* flag ASCII delimiters */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:129183: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(pSpace, argv[i], n+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:129397:32:  [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 *zByte = (const char *)sqlite3_value_text(apVal[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:129403:7:  [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(pCsr->zInput, zByte, nByte);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:130411: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.
      const char *zText = (const char *)sqlite3_value_text(apVal[i]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:130874:3:  [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(&pReader->zTerm[nPrefix], pNext, nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131104:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pReader->aNode, zRoot, nRoot);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131224:7:  [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(pReader->ppNextElem, aElem, nElem*sizeof(Fts3HashElem *));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131508:7:  [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(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131522: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(pTree->zTerm, zTerm, nTerm);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131769:3:  [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(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131772:3:  [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(&pWriter->aData[nData], aDoclist, nDoclist);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:131791:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pWriter->zTerm, zTerm, nTerm);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:132068:3:  [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(pMsr->aBuffer, pList, nList);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:132412:15:  [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(&pCsr->aBuffer[nDoclist], pList, nList);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133009:7:  [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->term.a[nPrefix], &p->aNode[p->iOff], nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133113: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(&pBlk->a[pBlk->n], &zTerm[nPrefix], nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133116: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(pNode->key.a, zTerm, nTerm);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133189:3:  [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(pPrev->a, zTerm, nTerm);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133196:3:  [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(&pNode->a[pNode->n], &zTerm[nPrefix], nSuffix);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133201:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(&pNode->a[pNode->n], aDoclist, nDoclist);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133527: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(pNode->block.a, aRoot, nRoot);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133539: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.
          memcpy(pNode->key.a, reader.term.a, reader.term.n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:133549:15:  [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(pNode->block.a, aBlock, nBlock);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:134013: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.
          memcpy(pHint->a, aHint, nHint);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:134554: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).
    p->nNodeSize = atoi(&zVal[9]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:134557:26:  [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).
    p->nMaxPendingData = atoi(&zVal[11]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:134679:3:  [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(pRet, &p->pList->aData[nSkip], *pnData);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:135434:3:  [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(&pStr->z[pStr->n], zAppend, nAppend);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:136099:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(pCsr->zMatchinfo, zArg, nArg+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:136370: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.
          char aBuffer[64];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:137729: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(pNode->zData, zBlob, pRtree->iNodeSize);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:138442:3:  [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, sqlite3_value_blob(pValue), nBlob);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:138593: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 zIdxStr[RTREE_MAX_DIMENSIONS*8+1];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:138719:3:  [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(&cell, p, sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139117:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139186:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139278:7:  [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(&left, &aCell[aaSorted[ii][0]], sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139279:7:  [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(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139308:3:  [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(pBboxLeft, &aCell[aaSorted[iBestDim][0]], sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139309:3:  [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(pBboxRight, &aCell[aaSorted[iBestDim][iBestSplit]], sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139349:3:  [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(pBboxLeft, &aCell[iLeftSeed], sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139350:3:  [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(pBboxRight, &aCell[iRightSeed], sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139432:3:  [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(&aCell[nCell], pCell, sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:139723:7:  [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(&aCell[ii], pCell, sizeof(RtreeCell));
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140158:16:  [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 *azSql[N_STATEMENT] = {
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140345:3:  [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(pRtree->zDb, argv[1], nDb);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140346:3:  [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(pRtree->zName, argv[2], nName);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140420: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 zCell[512];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140785: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 zBuf[128];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140913:22:  [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.
    zLocale = (const char *)sqlite3_value_text(apArg[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:141000:20:  [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.
  zLocale = (const char *)sqlite3_value_text(apArg[0]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:141001: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.
  zName = (const char *)sqlite3_value_text(apArg[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:141151:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(p->zLocale, argv[0], n);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h:115:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  int  (*open)(const char*,sqlite3**);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3ext.h:344:53:  [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).
#define sqlite3_open                   sqlite3_api->open
data/libchewing-0.5.1/src/bopomofo.c:556:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(bopomofoKeySeq);
data/libchewing-0.5.1/src/bopomofo.c:575:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(bopomofoKeySeqAlt);
data/libchewing-0.5.1/src/bopomofo.c:656:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        i = strlen(pBopomofo->pinYinData.keySeq);
data/libchewing-0.5.1/src/chewing-sql.c:346:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(path) + 1 + strlen(HASH_NAME) + 1;
data/libchewing-0.5.1/src/chewing-sql.c:346:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(path) + 1 + strlen(HASH_NAME) + 1;
data/libchewing-0.5.1/src/chewing-sql.c:354:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(path) + 1 + strlen(HASH_OLD_NAME) + 1;
data/libchewing-0.5.1/src/chewing-sql.c:354:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(path) + 1 + strlen(HASH_OLD_NAME) + 1;
data/libchewing-0.5.1/src/chewingio.c:196:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(search_path, syspath, sizeof(search_path) - 1);
data/libchewing-0.5.1/src/chewingio.c:1898:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    *phrase_len = strlen((const char *) sqlite3_column_text(pgdata->static_data.stmt_userphrase[STMT_USERPHRASE_SELECT],
data/libchewing-0.5.1/src/chewingio.c:1909:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        *phrase_len = strlen(pgdata->static_data.userphrase_enum->data.wordSeq) + 1;
data/libchewing-0.5.1/src/chewingio.c:1946:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (phrase_len < strlen(phrase) + 1) {
data/libchewing-0.5.1/src/chewingio.c:1947:67:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        LOG_ERROR("phrase_len %d is smaller than %d", phrase_len, strlen(phrase) + 1);
data/libchewing-0.5.1/src/chewingio.c:1962:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(phrase_buf, phrase, phrase_len);
data/libchewing-0.5.1/src/chewingio.c:1968:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(phrase_buf, pgdata->static_data.userphrase_enum->data.wordSeq, phrase_len);
data/libchewing-0.5.1/src/chewingutil.c:155:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf->char_, chibuf, sizeof(buf->char_) - 1);
data/libchewing-0.5.1/src/chewingutil.c:359:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(buf->char_, pgdata->choiceInfo.totalChoiceStr[sel_i], sizeof(buf->char_) - 1);
data/libchewing-0.5.1/src/chewingutil.c:446:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        pos += strlen(pgdata->preeditBuf[i].char_);
data/libchewing-0.5.1/src/chewingutil.c:848:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(pos, pgdata->preeditBuf[i].char_, MAX_UTF8_SIZE + 1);
data/libchewing-0.5.1/src/chewingutil.c:849:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        pos += strlen(pgdata->preeditBuf[i].char_);
data/libchewing-0.5.1/src/chewingutil.c:867:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                ueStrNCpy(pgo->bopomofoBuf + strlen(pgo->bopomofoBuf),
data/libchewing-0.5.1/src/chewingutil.c:1408: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).
        symbol = ALC(char, strlen(&line[2]) + 1);
data/libchewing-0.5.1/src/chewingutil.c:1460:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        x = strlen(pgdata->preeditBuf[i].char_);
data/libchewing-0.5.1/src/common/key2pho.c:132:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(inputkey);
data/libchewing-0.5.1/src/common/key2pho.c:173:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(phone, buffer, phone_len);
data/libchewing-0.5.1/src/common/key2pho.c:252:13:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
            strcat(bopomofo_buf + shift, " ");
data/libchewing-0.5.1/src/common/key2pho.c:253:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            shift += strlen(bopomofo_buf + shift);
data/libchewing-0.5.1/src/hash.c:175:63:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (sizeof(int) * 4 + ueStrLen(pItem->data.wordSeq) * 2 + strlen(pItem->data.wordSeq) >= FIELD_SIZE) {
data/libchewing-0.5.1/src/hash.c:196: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).
    *pc = strlen(pItem->data.wordSeq);
data/libchewing-0.5.1/src/hash.c:211: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).
    fseek(outfile, strlen(BIN_HASH_SIG), SEEK_SET);
data/libchewing-0.5.1/src/hash.c:219:51:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        pItem->item_index = (ftell(outfile) - 4 - strlen(BIN_HASH_SIG)) / FIELD_SIZE;
data/libchewing-0.5.1/src/hash.c:221:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        fseek(outfile, pItem->item_index * FIELD_SIZE + 4 + strlen(BIN_HASH_SIG), SEEK_SET);
data/libchewing-0.5.1/src/hash.c:335: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).
        fseek(infile, FIELD_SIZE - strlen(wordbuf) - 1, SEEK_CUR);
data/libchewing-0.5.1/src/hash.c:339:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    word_len = strlen(wordbuf);
data/libchewing-0.5.1/src/hash.c:438: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).
    memcpy(seekdump, BIN_HASH_SIG, strlen(BIN_HASH_SIG));
data/libchewing-0.5.1/src/hash.c:439:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    memcpy(seekdump + strlen(BIN_HASH_SIG),
data/libchewing-0.5.1/src/hash.c:441:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    seekdump += strlen(BIN_HASH_SIG) + sizeof(pgdata->static_data.chewing_lifetime);
data/libchewing-0.5.1/src/hash.c:506:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(pgdata->static_data.hashfilename, path, sizeof(pgdata->static_data.hashfilename));
data/libchewing-0.5.1/src/hash.c:511:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    hdrlen = strlen(BIN_HASH_SIG) + sizeof(pgdata->static_data.chewing_lifetime);
data/libchewing-0.5.1/src/hash.c:524: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).
        fwrite(BIN_HASH_SIG, 1, strlen(BIN_HASH_SIG), outfile);
data/libchewing-0.5.1/src/hash.c:528: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).
        if (memcmp(dump, BIN_HASH_SIG, strlen(BIN_HASH_SIG)) != 0) {
data/libchewing-0.5.1/src/hash.c:537:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        pgdata->static_data.chewing_lifetime = *(int *) (dump + strlen(BIN_HASH_SIG));
data/libchewing-0.5.1/src/pinyin.c:205:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            cursor = pinyinKeySeq + strlen(pgdata->static_data.hanyuInitialsMap[i].pinyin);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:35:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path, chewing_path, path_len);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:43:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(path, SEARCH_PATH_SEP CHEWING_DATADIR, path_len);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:64:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(path, chewing_path, path_len);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:83:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = strlen(path);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:118:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        *save_ptr = token + strlen(token);
data/libchewing-0.5.1/src/porting_layer/src/plat_path.c:187:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buffer, search_path, sizeof(buffer) - 1);
data/libchewing-0.5.1/src/tools/init_database.c:134: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).
    for (i = 0; i < strlen(line); ++i) {
data/libchewing-0.5.1/src/tools/init_database.c:142:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    end = line + strlen(line) - 1;
data/libchewing-0.5.1/src/tools/init_database.c:254:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(buf) == 0)
data/libchewing-0.5.1/src/tools/init_database.c:268:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(phrase_data[num_phrase_data].phrase, phrase, sizeof(phrase_data[0].phrase) - 1);
data/libchewing-0.5.1/src/tools/init_database.c:322:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            for (j = 0; j < strlen(phrase_data[num_phrase_data].phrase); ++j) {
data/libchewing-0.5.1/src/tools/init_database.c:392:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, line, sizeof(buf) - 1);
data/libchewing-0.5.1/src/tools/init_database.c:395:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(buf) == 0)
data/libchewing-0.5.1/src/tools/init_database.c:413:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (strlen(key_buf) > BOPOMOFO_SIZE) {
data/libchewing-0.5.1/src/tools/init_database.c:468:36:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (!strncmp(buf, CHARDEF, strlen(CHARDEF))) {
data/libchewing-0.5.1/src/tools/init_database.c:618:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            fwrite(cur_phr->phrase, strlen(cur_phr->phrase) + 1, 1, dict_file);
data/libchewing-0.5.1/src/userphrase-hash.c:140: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).
        if (!AlcUserPhraseSeq(&data, len, strlen(wordSeq))) {
data/libchewing-0.5.1/src/userphrase.c:72:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        path = calloc(sizeof(*path), len + 1 + strlen(USERPHRASE_DIR) + 1);
data/libchewing-0.5.1/test/genkeystroke.c:247:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            y = (y >= 54) ? 0 : (y + strlen((const char *) pgo->commitStr[i].s) - 3 < 0 ? y + 1 : y + 2);
data/libchewing-0.5.1/test/performance.c:27:18:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((ch = getchar()) != EOF) {
data/libchewing-0.5.1/test/randkeystroke.c:54:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n_tab1 = strlen(zhuin_tab[0]);
data/libchewing-0.5.1/test/randkeystroke.c:55:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n_tab2 = strlen(zhuin_tab[1]);
data/libchewing-0.5.1/test/randkeystroke.c:56:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n_tab3 = strlen(zhuin_tab[2]);
data/libchewing-0.5.1/test/randkeystroke.c:57:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n_tab4 = strlen(zhuin_tab[3]);
data/libchewing-0.5.1/test/stress.c:102:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int len = read(0, &c, 1);
data/libchewing-0.5.1/test/test-userphrase.c:342:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    expect_len = strlen(phrase) + 1;
data/libchewing-0.5.1/test/test-userphrase.c:345:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    expect_len = strlen(bopomofo) + 1;
data/libchewing-0.5.1/test/test-userphrase.c:416:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    expect_len = strlen(phrase) + 1;
data/libchewing-0.5.1/test/test-userphrase.c:419:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    expect_len = strlen(bopomofo) + 1;
data/libchewing-0.5.1/test/test-userphrase.c:434:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    expect_len = strlen(phrase) + 1;
data/libchewing-0.5.1/test/test-userphrase.c:437:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    expect_len = strlen(bopomofo) + 1;
data/libchewing-0.5.1/test/test-utf8.c:31:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(u8string);
data/libchewing-0.5.1/test/testchewing.c:23:13:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#    define getchar fake_getchar
data/libchewing-0.5.1/test/testchewing.c:35:14:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int ch = getchar();
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1700:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  c = fgetc(p->in);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1710:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(p->in);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:1743:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      c = fgetc(p->in);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2312:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(mainPrompt,azArg[1],(int)ArraySize(mainPrompt)-1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/shell.c:2315:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(continuePrompt,azArg[2],(int)ArraySize(continuePrompt)-1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:23447:42:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  { "read",         (sqlite3_syscall_ptr)read,       0  },
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:23936:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  n = (int)strlen(zAbsoluteName);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:26540:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  for(ii=(int)strlen(zDirname); ii>1 && zDirname[ii]!='/'; ii--);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:27238:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nShmFilename = 6 + (int)strlen(pDbFd->zPath);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28305:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nFilename = (int)strlen(zFilename) + 6;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28412: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).
  if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 18) >= (size_t)nBuf ){
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28412:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 18) >= (size_t)nBuf ){
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28418:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    j = (int)strlen(zBuf);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28681:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( (flags & SQLITE_OPEN_URI) || zName[strlen(zName)+1]==0 );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28694:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( zName[strlen(zName)+1]==0 );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:28961:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nCwd = (int)strlen(zOut);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29090:3:  [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(microseconds);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29384:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  dbLen = (int)strlen(dbPath);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29405:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = (int)strlen(lockPath);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29660: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(500000); /* wait 0.5 sec and try the lock again*/
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29686: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(10000000); /* wait 10 sec and try the lock again */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29833:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29964:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int len = (int)strlen(dbPath); /* Length of database filename - dbPath */
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:29990:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  assert( (int)strlen(conchPath) == len+7 );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:30040:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:30047:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:30047:55:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:30051:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:34796:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        zUtf8Name[strlen(zUtf8Name)+1]==0 );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:107792:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  assert( zAff==0 || strlen(zAff)>=nEq );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:120885:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nRet = 2 + (int)strlen(zInput)*2 + 1;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121141: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).
      nStr += (int)strlen(zCol) + 1;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121152:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int n = (int)strlen(zCol)+1;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121218: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).
  assert( strlen(argv[0])==4 );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121223:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nDb = (int)strlen(argv[1]) + 1;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121224:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nName = (int)strlen(argv[2]) + 1;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121258: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(z)>8
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121297:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
              if( strlen(zVal)!=4 || sqlite3_strnicmp(zVal, "fts3", 4) ){
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121323: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( (strlen(zVal)!=3 || sqlite3_strnicmp(zVal, "asc", 3)) 
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121324:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
               && (strlen(zVal)!=4 || sqlite3_strnicmp(zVal, "desc", 4)) 
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121357: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).
      nString += (int)(strlen(z) + 1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:121480:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n = (int)strlen(p->azColumn[iCol]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:125606:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nDb = (int)strlen(zDb);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:125610:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      nDb = (int)strlen(zDb);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:125618:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nFts3 = (int)strlen(zFts3);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:126539: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 nStr = (int)strlen(zStr);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:126969:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    n = (int)strlen(z);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127393:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  if( nKey<=0 ) nKey = (int) strlen(z);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:127782:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    c->nInput = (int)strlen(zInput);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128228: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).
  *pnOut = i = (int)strlen(z);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128486:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  zEnd = &zCopy[strlen(zCopy)];
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128492:68:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash,z,(int)strlen(z)+1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128891: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 i, n = (int)strlen(argv[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:128943:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    c->nBytes = (int)strlen(pInput);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:129134:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  int nName = (int)strlen(zName);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:129172:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
      nByte += (int)(strlen(argv[i]) + 1);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:129181:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        int n = (int)strlen(argv[i]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:135415: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).
    nAppend = (int)strlen(zAppend);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:136093:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nArg = (int)strlen(zArg);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:136680:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int n = strlen(z);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:136732:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    pCsr->nInput = (int)strlen(aInput);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:138501: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).
                || (idxStr && (int)strlen(idxStr)==argc*2) );
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140331:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nDb = (int)strlen(argv[1]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140332:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  nName = (int)strlen(argv[2]);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140427:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nCell = (int)strlen(zCell);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:140436: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).
      nCell = (int)strlen(zCell);
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:141141: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).
    n = strlen(argv[0])+1;
data/libchewing-0.5.1/thirdparty/sqlite-amalgamation/sqlite3.c:141197:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    nInput = strlen(zInput);

ANALYSIS SUMMARY:

Hits = 739
Lines analyzed = 173835 in approximately 5.61 seconds (30963 lines/second)
Physical Source Lines of Code (SLOC) = 104272
Hits@level = [0] 420 [1] 144 [2] 516 [3]  20 [4]  59 [5]   0
Hits@level+ = [0+] 1159 [1+] 739 [2+] 595 [3+]  79 [4+]  59 [5+]   0
Hits/KSLOC@level+ = [0+] 11.1152 [1+] 7.08723 [2+] 5.70623 [3+] 0.757634 [4+] 0.565828 [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.