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/snowball-2.0.0/compiler/analyser.c
Examining data/snowball-2.0.0/compiler/driver.c
Examining data/snowball-2.0.0/compiler/generator.c
Examining data/snowball-2.0.0/compiler/generator_csharp.c
Examining data/snowball-2.0.0/compiler/generator_go.c
Examining data/snowball-2.0.0/compiler/generator_java.c
Examining data/snowball-2.0.0/compiler/generator_js.c
Examining data/snowball-2.0.0/compiler/generator_pascal.c
Examining data/snowball-2.0.0/compiler/generator_python.c
Examining data/snowball-2.0.0/compiler/generator_rust.c
Examining data/snowball-2.0.0/compiler/header.h
Examining data/snowball-2.0.0/compiler/space.c
Examining data/snowball-2.0.0/compiler/syswords.h
Examining data/snowball-2.0.0/compiler/syswords2.h
Examining data/snowball-2.0.0/compiler/tokeniser.c
Examining data/snowball-2.0.0/examples/stemwords.c
Examining data/snowball-2.0.0/include/libstemmer.h
Examining data/snowball-2.0.0/libstemmer/test.c
Examining data/snowball-2.0.0/runtime/api.c
Examining data/snowball-2.0.0/runtime/api.h
Examining data/snowball-2.0.0/runtime/header.h
Examining data/snowball-2.0.0/runtime/utilities.c

FINAL RESULTS:

data/snowball-2.0.0/compiler/driver.c:88:21:  [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(s, "w");
data/snowball-2.0.0/compiler/driver.c:375:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(new_name, leaf, len);
data/snowball-2.0.0/compiler/driver.c:405:21:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
                    memcpy(new_name, leaf, len);
data/snowball-2.0.0/compiler/generator.c:1214: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 buf[64];
data/snowball-2.0.0/compiler/generator.c:1219:13:  [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, "z->p[z->c + %d]", shortest_size - 1);
data/snowball-2.0.0/compiler/header.h:135: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 token_disabled[NUM_TOKEN_CODES];
data/snowball-2.0.0/compiler/header.h:315: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 * S[10];  /* strings */
data/snowball-2.0.0/compiler/space.c:210: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 s[30];
data/snowball-2.0.0/compiler/space.c:211: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(s, "%d", i);
data/snowball-2.0.0/compiler/tokeniser.c:26: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 * input = fopen(filename, "r");
data/snowball-2.0.0/examples/stemwords.c:175:32:  [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_in = (in == 0) ? stdin : fopen(in, "r");
data/snowball-2.0.0/examples/stemwords.c:180:35:  [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_out = (out == 0) ? stdout : fopen(out, "w");
data/snowball-2.0.0/compiler/driver.c:366:35:  [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 = (dot == NULL) ? strlen(leaf) : (size_t)(dot - leaf);
data/snowball-2.0.0/compiler/generator.c:286: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator.c:1416: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).
        if (g->options->runtime_path[strlen(g->options->runtime_path) - 1] != '/')
data/snowball-2.0.0/compiler/generator_csharp.c:198: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator_go.c:204: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator_java.c:202: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator_js.c:198: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator_pascal.c:227: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator_python.c:202: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 l = strlen(input);
data/snowball-2.0.0/compiler/generator_rust.c:203: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 l = strlen(input);
data/snowball-2.0.0/compiler/space.c:141: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(s);
data/snowball-2.0.0/compiler/tokeniser.c:32:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int ch = getc(input);
data/snowball-2.0.0/compiler/tokeniser.c:94: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 l = strlen(s);
data/snowball-2.0.0/examples/stemwords.c:23:18:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        int ch = getc(f_in);
data/snowball-2.0.0/examples/stemwords.c:46:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
                ch = getc(f_in);
data/snowball-2.0.0/libstemmer/test.c:27: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).
    if (sb_stemmer_length(s) != strlen(stemmed))

ANALYSIS SUMMARY:

Hits = 28
Lines analyzed = 15022 in approximately 0.82 seconds (18234 lines/second)
Physical Source Lines of Code (SLOC) = 12084
Hits@level = [0] 117 [1]  16 [2]  12 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+] 145 [1+]  28 [2+]  12 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 11.9993 [1+] 2.31711 [2+] 0.993049 [3+]   0 [4+]   0 [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.