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/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_danish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_swedish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_italian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_2_romanian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_swedish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_finnish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_french.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_french.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_romanian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_danish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_german.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_german.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_portuguese.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_norwegian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_italian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_russian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_danish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_hungarian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_dutch.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_spanish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_finnish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_hungarian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_german.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_spanish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_porter.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_danish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_dutch.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_french.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_KOI8_R_russian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_finnish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_french.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_turkish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_KOI8_R_russian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_swedish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_dutch.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_german.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_spanish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_finnish.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_spanish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_swedish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_english.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_russian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_romanian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_english.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_hungarian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_porter.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_2_romanian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_portuguese.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_italian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_dutch.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_italian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_turkish.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_porter.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_porter.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_english.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_norwegian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_UTF_8_portuguese.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_english.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/src_c/stem_ISO_8859_1_norwegian.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/libstemmer/modules_utf8.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/libstemmer/libstemmer.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/libstemmer/modules.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/include/libstemmer.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/runtime/api.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/runtime/header.h Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/runtime/utilities.c Examining data/liblingua-stem-snowball-perl-0.952/libstemmer_c/runtime/api.h Examining data/liblingua-stem-snowball-perl-0.952/ppport.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/runtime/header.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/runtime/api.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/runtime/api.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/runtime/utilities.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/libstemmer/libstemmer.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/libstemmer/modules_utf8.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/libstemmer/libstemmer_utf8.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/libstemmer/modules.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/syswords2.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/space.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/driver.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/header.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/tokeniser.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/syswords.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/analyser.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator_java.c Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/include/libstemmer.h Examining data/liblingua-stem-snowball-perl-0.952/snowball-code/examples/stemwords.c FINAL RESULTS: data/liblingua-stem-snowball-perl-0.952/ppport.h:6346:14: [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. retval = vsnprintf(buffer, len, format, ap); data/liblingua-stem-snowball-perl-0.952/ppport.h:6348:14: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. retval = vsprintf(buffer, format, ap); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/analyser.c:19:29: [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. for (i = 0; i < n; i++) printf(i == n - 1 ? s : " "); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/driver.c:18: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(stderr, "Usage: snowball <file> [options]\n\n" data/liblingua-stem-snowball-perl-0.952/ppport.h:3549:42: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define CopyD(s,d,n,t) memcpy((char*)(d),(char*)(s), (n) * sizeof(t)) data/liblingua-stem-snowball-perl-0.952/ppport.h:6201: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. && (xdigit = strchr((char *) PL_hexdigit, s[1]))) data/liblingua-stem-snowball-perl-0.952/ppport.h:6397: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(dst + used, src, copy); data/liblingua-stem-snowball-perl-0.952/ppport.h:6426: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(dst, src, copy); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/driver.c:51: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator.c:1018: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[64]; data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator.c:1023: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, "z->p[z->c + %d]", shortest_size - 1); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/header.h:267: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/space.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 s[30]; data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/space.c:195: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/tokeniser.c:25:24: [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(s, "r"); data/liblingua-stem-snowball-perl-0.952/snowball-code/examples/stemwords.c:179: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/liblingua-stem-snowball-perl-0.952/snowball-code/examples/stemwords.c:184: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/liblingua-stem-snowball-perl-0.952/ppport.h:4835: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). sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); data/liblingua-stem-snowball-perl-0.952/ppport.h:4843:59: [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). # define sv_vcatpvf(sv, pat, args) sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) data/liblingua-stem-snowball-perl-0.952/ppport.h:4847:59: [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). # define sv_vsetpvf(sv, pat, args) sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)) data/liblingua-stem-snowball-perl-0.952/ppport.h:4867: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). sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/liblingua-stem-snowball-perl-0.952/ppport.h:4895: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). sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/liblingua-stem-snowball-perl-0.952/ppport.h:4916:27: [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). sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ data/liblingua-stem-snowball-perl-0.952/ppport.h:4938: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). sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/liblingua-stem-snowball-perl-0.952/ppport.h:4966: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). sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*)); data/liblingua-stem-snowball-perl-0.952/ppport.h:4987:27: [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). sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*)); \ data/liblingua-stem-snowball-perl-0.952/ppport.h:5795: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). STRLEN len = strlen(radix); data/liblingua-stem-snowball-perl-0.952/ppport.h:6393: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). used = strlen(dst); data/liblingua-stem-snowball-perl-0.952/ppport.h:6394: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). length = strlen(src); data/liblingua-stem-snowball-perl-0.952/ppport.h:6423: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). length = strlen(src); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/driver.c:12: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 s1_len = strlen(s1); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/driver.c:13: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 s2_len = strlen(s2); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator.c:218: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator.c:1209: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/generator_java.c:272: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/space.c:125: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/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/tokeniser.c:32:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). { int ch = getc(input); data/liblingua-stem-snowball-perl-0.952/snowball-code/compiler/tokeniser.c:97: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/liblingua-stem-snowball-perl-0.952/snowball-code/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/liblingua-stem-snowball-perl-0.952/snowball-code/examples/stemwords.c:47:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ch = getc(f_in); ANALYSIS SUMMARY: Hits = 40 Lines analyzed = 41081 in approximately 1.27 seconds (32260 lines/second) Physical Source Lines of Code (SLOC) = 34419 Hits@level = [0] 96 [1] 23 [2] 13 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 136 [1+] 40 [2+] 17 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 3.95131 [1+] 1.16215 [2+] 0.493913 [3+] 0.116215 [4+] 0.116215 [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.