Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.h
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/cfgrw.c
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/cfgrw.h
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.h
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniexample.c
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.h
Examining data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/parse.c

FINAL RESULTS:

data/fcitx-autoeng-ng-0.1.1~git20150311/src/cfgrw.c:34: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(val, s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:68: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(t,s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:83: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(l, s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:255:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(keym, "%s:", s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:290:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(keym, "%s:", s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:336:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(keym, "%s:", s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:565: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(line, strstrip(input_line));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:578: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(section, strstrip(section));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:579: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(section, strlwc(section));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:585: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(key, strstrip(key));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:586: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(key, strlwc(key));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:587: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(value, strstrip(value));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:604: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(key, strstrip(key));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:605: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(key, strlwc(key));
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:702:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(tmp, "%s:%s", section, key);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/cfgrw.c:13:19:  [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 *homePath = getenv("HOME");
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c:202:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        memcpy(autoEngState->buf, str, len);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.h:36:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char            str[MAX_AUTO_TO_ENG + 1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/cfgrw.c:12: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.
	static char usrPath[BUFF_SIZE] = {0};
data/fcitx-autoeng-ng-0.1.1~git20150311/src/cfgrw.c:23: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.
	static char val[VALUE_SIZE] = {0};
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:46: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(newptr, ptr, size);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:365: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        cval[90] ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:374: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(cval, "%04d", i);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:379: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(cval, "%04d", i);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:387: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(cval, "%04d", i);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniexample.c:28: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).
    ini = fopen("example.ini", "w");
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:46: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 l[ASCIILINESZ+1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:76: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 l[ASCIILINESZ+1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:247: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    keym[ASCIILINESZ+1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:281: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    keym[ASCIILINESZ+1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:323: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    keym[ASCIILINESZ+1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:562: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        line[ASCIILINESZ+1];
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:633: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 line    [ASCIILINESZ+1] ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:634: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 section [ASCIILINESZ+1] ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:635: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     [ASCIILINESZ+1] ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:636:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char tmp     [ASCIILINESZ+1] ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:637: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 val     [ASCIILINESZ+1] ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:646:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in=fopen(ininame, "r"))==NULL) {
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c:198:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = str ? strlen(str) : 0;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c:599:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(line) > MAX_AUTO_TO_ENG)
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c:601:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(autoeng.str, line, MAX_AUTO_TO_ENG);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c:738:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    buff_len = strlen(autoEngState->buf);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/AutoEng.c:739:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(raw_buff, autoEngState->buf, MAX_USER_INPUT);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:66: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).
    t = (char*)malloc(strlen(s)+1) ;
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/dictionary.c:94: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(key);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:84: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).
    last = l + strlen(l);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:253: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).
    seclen  = (int)strlen(s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:289: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).
    seclen  = (int)strlen(s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:335: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).
    seclen  = (int)strlen(s);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:566:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = (int)strlen(line);
data/fcitx-autoeng-ng-0.1.1~git20150311/src/iniparser/iniparser.c:665:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len = (int)strlen(line)-1;

ANALYSIS SUMMARY:

Hits = 51
Lines analyzed = 2625 in approximately 0.11 seconds (24296 lines/second)
Physical Source Lines of Code (SLOC) = 1344
Hits@level = [0]  40 [1]  13 [2]  22 [3]   1 [4]  15 [5]   0
Hits@level+ = [0+]  91 [1+]  51 [2+]  38 [3+]  16 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 67.7083 [1+] 37.9464 [2+] 28.2738 [3+] 11.9048 [4+] 11.1607 [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.