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/nuspell-3.0.0/src/hunspell/affentry.cxx Examining data/nuspell-3.0.0/src/hunspell/affixmgr.cxx Examining data/nuspell-3.0.0/src/hunspell/csutil.cxx Examining data/nuspell-3.0.0/src/hunspell/filemgr.cxx Examining data/nuspell-3.0.0/src/hunspell/hashmgr.cxx Examining data/nuspell-3.0.0/src/hunspell/hunspell.cxx Examining data/nuspell-3.0.0/src/hunspell/hunspell.h Examining data/nuspell-3.0.0/src/hunspell/hunvisapi.h Examining data/nuspell-3.0.0/src/hunspell/hunzip.cxx Examining data/nuspell-3.0.0/src/hunspell/phonet.cxx Examining data/nuspell-3.0.0/src/hunspell/replist.cxx Examining data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx Examining data/nuspell-3.0.0/src/nuspell/aff_data.cxx Examining data/nuspell-3.0.0/src/nuspell/dictionary.cxx Examining data/nuspell-3.0.0/src/nuspell/finder.cxx Examining data/nuspell-3.0.0/src/nuspell/main.cxx Examining data/nuspell-3.0.0/src/nuspell/utils.cxx Examining data/nuspell-3.0.0/src/parsers/firstparser.cxx Examining data/nuspell-3.0.0/src/parsers/htmlparser.cxx Examining data/nuspell-3.0.0/src/parsers/latexparser.cxx Examining data/nuspell-3.0.0/src/parsers/manparser.cxx Examining data/nuspell-3.0.0/src/parsers/odfparser.cxx Examining data/nuspell-3.0.0/src/parsers/testparser.cxx Examining data/nuspell-3.0.0/src/parsers/textparser.cxx Examining data/nuspell-3.0.0/src/parsers/xmlparser.cxx Examining data/nuspell-3.0.0/src/tools/analyze.cxx Examining data/nuspell-3.0.0/src/tools/bulkcheck.cxx Examining data/nuspell-3.0.0/src/tools/chmorph.cxx Examining data/nuspell-3.0.0/src/tools/example.cxx Examining data/nuspell-3.0.0/src/tools/fuzzer.cxx Examining data/nuspell-3.0.0/src/tools/hunspell.cxx Examining data/nuspell-3.0.0/src/tools/hunzip.cxx Examining data/nuspell-3.0.0/src/tools/hzip.cxx Examining data/nuspell-3.0.0/src/tools/munch.cxx Examining data/nuspell-3.0.0/src/tools/munch.h Examining data/nuspell-3.0.0/src/tools/unmunch.cxx Examining data/nuspell-3.0.0/src/tools/unmunch.h Examining data/nuspell-3.0.0/tests/aff_data_test.cxx Examining data/nuspell-3.0.0/tests/catch_main.cxx Examining data/nuspell-3.0.0/tests/dictionary_test.cxx Examining data/nuspell-3.0.0/tests/legacy_test.cxx Examining data/nuspell-3.0.0/tests/structures_test.cxx Examining data/nuspell-3.0.0/tests/utils_test.cxx Examining data/nuspell-3.0.0/tests/verify.cxx FINAL RESULTS: data/nuspell-3.0.0/src/hunspell/affentry.cxx:938:64: [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 we set up a conds array of 256 bytes indexed (0 to 255) and access it data/nuspell-3.0.0/src/hunspell/filemgr.cxx:79: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(stderr, err, par); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:236:3: [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(hpw, word->c_str()); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:254:7: [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(hpw + word->size() + 1, desc->c_str()); data/nuspell-3.0.0/src/hunspell/hunzip.cxx:54: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(stderr, err, par); data/nuspell-3.0.0/src/hunspell/hunzip.cxx:250: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(linebuf + l - 1, line + strlen(line) - right - 1); data/nuspell-3.0.0/src/hunspell/hunzip.cxx:253:3: [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 + left, linebuf); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:740:3: [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(candidate + 1, word); data/nuspell-3.0.0/src/tools/hunspell.cxx:636:7: [4] (shell) system: 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. if (system((std::string("mkdir ") + odftmpdir).c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:674:39: [4] (shell) system: 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. if (!secure_filename(filename) || system(sbuf.str().c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:679:11: [4] (shell) system: 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. if (system((std::string("rmdir ") + odftmpdir).c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:689:11: [4] (shell) system: 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. if (system((std::string("rmdir ") + odftmpdir).c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:698: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(stdout, HUNSPELL_VERSION); data/nuspell-3.0.0/src/tools/hunspell.cxx:1016:9: [4] (shell) system: 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. if (system(sbuf.str().c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:1583:39: [4] (shell) system: 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. if (!secure_filename(filename) || system(sbuf.str().c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:1589:13: [4] (shell) system: 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. (void)system((std::string("rmdir ") + odftmpdir).c_str()); data/nuspell-3.0.0/src/tools/hunspell.cxx:1600:13: [4] (shell) system: 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. (void)system((std::string("rmdir ") + odftmpdir).c_str()); data/nuspell-3.0.0/src/tools/hunspell.cxx:1631:17: [4] (shell) system: 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. if (system(sbuf.str().c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:1664:13: [4] (shell) system: 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. if (system(sbuf.str().c_str()) != 0) data/nuspell-3.0.0/src/tools/hunspell.cxx:1676:9: [4] (shell) system: 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. if (system(sbuf.str().c_str()) != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:2140: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(stdout, HUNSPELL_PIPE_HEADING); data/nuspell-3.0.0/src/tools/hunzip.cxx:50: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, DESC); data/nuspell-3.0.0/src/tools/hzip.cxx:73: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(stderr, err, par); data/nuspell-3.0.0/src/tools/hzip.cxx:92: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(table[i], code); data/nuspell-3.0.0/src/tools/munch.cxx:168:13: [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(ap, (roots[j].hashent)->affstr); data/nuspell-3.0.0/src/tools/munch.cxx:729: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(pp, (word + aent->stripl)); data/nuspell-3.0.0/src/tools/munch.cxx:771:11: [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(pp, aent->appnd); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:407:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:422:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:445:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:460:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:476:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:524:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:529:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:554:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:582:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:587:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:609:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:744:7: [3] (random) setstate: 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. in.setstate(in.failbit); data/nuspell-3.0.0/src/nuspell/finder.cxx:78:17: [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. auto dicpath = getenv("DICPATH"); data/nuspell-3.0.0/src/nuspell/finder.cxx:83: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. auto home = getenv("HOME"); data/nuspell-3.0.0/src/nuspell/finder.cxx:98: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. auto winpaths = {getenv("LOCALAPPDATA"), getenv("PROGRAMDATA")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:98:43: [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. auto winpaths = {getenv("LOCALAPPDATA"), getenv("PROGRAMDATA")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:382: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. auto home = getenv("HOME"); data/nuspell-3.0.0/src/nuspell/finder.cxx:398: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. auto winpaths = {getenv("PROGRAMFILES"), getenv("PROGRAMFILES(x86)")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:398:43: [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. auto winpaths = {getenv("PROGRAMFILES"), getenv("PROGRAMFILES(x86)")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:407:15: [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* home = getenv("APPDATA"); data/nuspell-3.0.0/src/nuspell/finder.cxx:454: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. auto home = getenv("HOME"); data/nuspell-3.0.0/src/nuspell/finder.cxx:463: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. auto prefixes = {getenv("PROGRAMFILES"), getenv("PROGRAMFILES(x86)")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:463:43: [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. auto prefixes = {getenv("PROGRAMFILES"), getenv("PROGRAMFILES(x86)")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:473: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. auto home = getenv("APPDATA"); data/nuspell-3.0.0/src/nuspell/finder.cxx:529: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. auto home = getenv("HOME"); data/nuspell-3.0.0/src/nuspell/finder.cxx:538: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. auto prefixes = {getenv("PROGRAMFILES"), getenv("PROGRAMFILES(x86)")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:538:43: [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. auto prefixes = {getenv("PROGRAMFILES"), getenv("PROGRAMFILES(x86)")}; data/nuspell-3.0.0/src/nuspell/finder.cxx:548: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. auto home = getenv("APPDATA"); data/nuspell-3.0.0/src/nuspell/main.cxx:97:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, shortopts, longopts, nullptr)) != data/nuspell-3.0.0/src/nuspell/main.cxx:245:15: [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. auto home = getenv("HOME"); data/nuspell-3.0.0/src/tools/hunspell.cxx:141: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. #define HOME getenv("HOME") data/nuspell-3.0.0/src/tools/hunspell.cxx:632:21: [3] (tmpfile) tmpnam: Temporary file race condition (CWE-377). char *odftmpdir = tmpnam(NULL); data/nuspell-3.0.0/src/tools/hunspell.cxx:1999:21: [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 (!(dicname = getenv("DICTIONARY"))) { data/nuspell-3.0.0/src/tools/hunspell.cxx:2006:24: [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 ((dicname = getenv(tests[i])) && strcmp(dicname, "") != 0) { data/nuspell-3.0.0/src/tools/hunspell.cxx:2036:9: [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("DICPATH")) { data/nuspell-3.0.0/src/tools/hunspell.cxx:2037:27: [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. path_std_str.append(getenv("DICPATH")).append(PATHSEP); data/nuspell-3.0.0/src/tools/hunspell.cxx:2064:28: [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. privdicname = mystrdup(getenv("WORDLIST")); data/nuspell-3.0.0/tests/verify.cxx:84:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, shortopts, longopts, nullptr)) != data/nuspell-3.0.0/src/hunspell/affentry.cxx:888:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (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 conds[SETSIZE]; // array which encodes the conditions to be met data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:248: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 dupflags[CONTSIZE]; data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:1056: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(entry.c.conds, cs, short_part); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:3648:10: [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). *out = atoi(s.c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:3665: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). cpdmaxsyllable = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:3718: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). numrep = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:3816:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). numrl = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:3908:15: [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). num = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4001: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). numcheckcpd = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4098:21: [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). numdefcpd = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4201: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). nummap = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4303: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). numbreak = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4511:19: [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). numents = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4639:27: [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). int index = atoi(dash_str.c_str()); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4709:25: [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). int index = atoi(chunk.c_str()); data/nuspell-3.0.0/src/hunspell/csutil.cxx:121:15: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int len = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0); data/nuspell-3.0.0/src/hunspell/csutil.cxx:124:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, path, -1, buff, len); data/nuspell-3.0.0/src/hunspell/csutil.cxx:126:14: [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). stream.open(buff2, mode); data/nuspell-3.0.0/src/hunspell/csutil.cxx:133: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). stream.open(path, mode); data/nuspell-3.0.0/src/hunspell/csutil.cxx:305: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(d, s, sl); data/nuspell-3.0.0/src/hunspell/csutil.cxx:439: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 c(beg[i]); data/nuspell-3.0.0/src/hunspell/csutil.cxx:610: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(dest, &source, sizeof(char*)); data/nuspell-3.0.0/src/hunspell/csutil.cxx:616: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, s, sizeof(char*)); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:252:56: [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). store_pointer(hpw + word->size() + 1, get_aliasm(atoi(desc->c_str()))); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:341: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(flags2, flags, flagslen * sizeof(unsigned short)); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:458: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((void*)flags, (void*)dp->astr, data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:505:15: [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). tablesize = atoi(ts.c_str()); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:584:21: [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). int index = atoi(ap.c_str()); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:669:19: [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). int i = atoi(src); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:682:15: [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). int i = atoi(src); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:700: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(*result, &w[0], len * sizeof(short)); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:742:19: [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). int i = atoi(src); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:754:15: [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). int i = atoi(src); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:771: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(&result[origsize], &w[0], len * sizeof(short)); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:792:11: [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). i = atoi(f); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:802: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(&s, &w[0], 1 * sizeof(short)); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:972:21: [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). numaliasf = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/hashmgr.cxx:1101:21: [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). numaliasm = atoi(std::string(start_piece, iter).c_str()); data/nuspell-3.0.0/src/hunspell/hunzip.cxx:69: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 c[2]; data/nuspell-3.0.0/src/hunspell/hunzip.cxx:208: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 linebuf[BUFSIZE]; data/nuspell-3.0.0/src/hunspell/phonet.cxx:81: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 word[MAXPHONETUTF8LEN + 1]; data/nuspell-3.0.0/src/nuspell/finder.cxx:177:7: [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). auto open(const string& dirname) -> bool data/nuspell-3.0.0/src/nuspell/finder.cxx:203:7: [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). auto open(const string& dirname) -> bool data/nuspell-3.0.0/src/nuspell/finder.cxx:225:7: [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). auto open(const string& dirname) -> bool { return false; } data/nuspell-3.0.0/src/nuspell/finder.cxx:592:8: [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). if (d.open(dir) == false) { data/nuspell-3.0.0/src/nuspell/main.cxx:250:8: [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). file.open(name); data/nuspell-3.0.0/src/parsers/testparser.cxx:63:7: [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(argv[1], "r"); data/nuspell-3.0.0/src/parsers/testparser.cxx:72: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[MAXLNLEN]; data/nuspell-3.0.0/src/tools/analyze.cxx:61:18: [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* wtclst = fopen(argv[3], "r"); data/nuspell-3.0.0/src/tools/analyze.cxx:68: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[100]; data/nuspell-3.0.0/src/tools/chmorph.cxx:70:7: [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(argv[3], "r"); data/nuspell-3.0.0/src/tools/chmorph.cxx:80: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[MAXLNLEN]; data/nuspell-3.0.0/src/tools/hunspell.cxx:152: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 text_conv[MAXLNLEN]; data/nuspell-3.0.0/src/tools/hunspell.cxx:333: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 letters[MAXLNLEN]; data/nuspell-3.0.0/src/tools/hunspell.cxx: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 ch[2]; data/nuspell-3.0.0/src/tools/hunspell.cxx: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 u8[10]; data/nuspell-3.0.0/src/tools/hunspell.cxx:495: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). FILE* f = fopen(LOGFILE, "a"); data/nuspell-3.0.0/src/tools/hunspell.cxx:534:7: [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). dic.open(filename, std::ios_base::in); data/nuspell-3.0.0/src/tools/hunspell.cxx:545:5: [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). f.open(filename, std::ios_base::in); data/nuspell-3.0.0/src/tools/hunspell.cxx:553: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). FILE* dic = fopen(filename.c_str(), "r"); data/nuspell-3.0.0/src/tools/hunspell.cxx:556: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). dic = fopen(filename.c_str(), "a"); data/nuspell-3.0.0/src/tools/hunspell.cxx:558: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). dic = fopen(filename2.c_str(), "a"); data/nuspell-3.0.0/src/tools/hunspell.cxx:581: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 input[INPUTLEN]; data/nuspell-3.0.0/src/tools/hunspell.cxx:646: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[MAXLNLEN]; data/nuspell-3.0.0/src/tools/hunspell.cxx:686: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). fileid = fopen(file.c_str(), "r"); data/nuspell-3.0.0/src/tools/hunspell.cxx:1548: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[MAXLNLEN]; data/nuspell-3.0.0/src/tools/hunspell.cxx:1553: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* text = fopen(filename, "r"); data/nuspell-3.0.0/src/tools/hunspell.cxx:1596: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). text = fopen(filename, "r"); data/nuspell-3.0.0/src/tools/hunspell.cxx:1605:20: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). FILE* tempfile = tmpfile(); data/nuspell-3.0.0/src/tools/hunspell.cxx:1651: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). text = fopen(filename, "wb"); data/nuspell-3.0.0/src/tools/hunspell.cxx:2151: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). FILE* f = fopen(argv[i], "r"); data/nuspell-3.0.0/src/tools/hzip.cxx:116: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 c[2]; data/nuspell-3.0.0/src/tools/hzip.cxx:193: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 bitbuf[BUFSIZE]; data/nuspell-3.0.0/src/tools/hzip.cxx:198: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 c[2]; data/nuspell-3.0.0/src/tools/hzip.cxx:275: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[BUFSIZE]; data/nuspell-3.0.0/src/tools/hzip.cxx:276: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 buf2[BUFSIZE * 2]; data/nuspell-3.0.0/src/tools/hzip.cxx:277: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 prev[BUFSIZE]; data/nuspell-3.0.0/src/tools/hzip.cxx:330: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(prev, buf, i); data/nuspell-3.0.0/src/tools/hzip.cxx:342: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). FILE* f = fopen(filename, "r"); data/nuspell-3.0.0/src/tools/hzip.cxx:348:20: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). int tempfileno = mkstemp(tmpfiletemplate); data/nuspell-3.0.0/src/tools/hzip.cxx:365: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). FILE* f2 = fopen(out.c_str(), "wb"); data/nuspell-3.0.0/src/tools/munch.cxx:64: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 as[(MAX_PREFIXES + MAX_SUFFIXES)]; data/nuspell-3.0.0/src/tools/munch.cxx:93: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). afflst = fopen(af, "r"); data/nuspell-3.0.0/src/tools/munch.cxx:116: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). wrdlst = fopen(wf, "r"); data/nuspell-3.0.0/src/tools/munch.cxx:286:25: [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). numents = atoi(piece); data/nuspell-3.0.0/src/tools/munch.cxx:398: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 mbr[MAX_WD_LEN]; data/nuspell-3.0.0/src/tools/munch.cxx:629: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 ts[MAX_LN_LEN]; data/nuspell-3.0.0/src/tools/munch.cxx:636:15: [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). tablesize = atoi(ts); data/nuspell-3.0.0/src/tools/munch.cxx:695: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(tmp, ep->affstr, (al + 1)); data/nuspell-3.0.0/src/tools/munch.cxx:710: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 tword[MAX_WD_LEN]; data/nuspell-3.0.0/src/tools/munch.cxx:747: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 tword[MAX_WD_LEN]; data/nuspell-3.0.0/src/tools/munch.cxx:836: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(rv, mp, nc); data/nuspell-3.0.0/src/tools/munch.cxx:842: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(rv, mp, n); data/nuspell-3.0.0/src/tools/munch.cxx:857: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(d, s, sl); data/nuspell-3.0.0/src/tools/munch.h:69: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 conds[SET_SIZE]; data/nuspell-3.0.0/src/tools/unmunch.cxx:65: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 ts[MAX_LN_LEN]; data/nuspell-3.0.0/src/tools/unmunch.cxx:88: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). afflst = fopen(af, "r"); data/nuspell-3.0.0/src/tools/unmunch.cxx:113: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). wrdlst = fopen(wf, "r"); data/nuspell-3.0.0/src/tools/unmunch.cxx:200:25: [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). numents = atoi(piece); data/nuspell-3.0.0/src/tools/unmunch.cxx:318: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 mbr[MAX_WD_LEN]; data/nuspell-3.0.0/src/tools/unmunch.cxx:518: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(rv, mp, nc); data/nuspell-3.0.0/src/tools/unmunch.cxx:524: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(rv, mp, n); data/nuspell-3.0.0/src/tools/unmunch.cxx:539: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(d, s, sl); data/nuspell-3.0.0/src/tools/unmunch.h:65: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 conds[SET_SIZE]; data/nuspell-3.0.0/tests/legacy_test.cxx:47:8: [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). file.open(test + ".good"); data/nuspell-3.0.0/tests/legacy_test.cxx:62:8: [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). file.open(test + ".wrong"); data/nuspell-3.0.0/tests/legacy_test.cxx:76:8: [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). file.open(test + ".wrong"); data/nuspell-3.0.0/tests/legacy_test.cxx:94:8: [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). file.open(test + ".sug"); data/nuspell-3.0.0/src/hunspell/affentry.cxx:960:2: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (read that only 8 character positions) can be examined at one data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:780:7: [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) == 0) { data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:846:7: [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) == 0) { data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:1054:26: [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). const size_t cslen = strlen(cs); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:1926:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ? affix_check((word.c_str() + i), strlen(word.c_str() + i), compoundflag, data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:1932:52: [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). rv = affix_check((word.c_str() + i), strlen(word.c_str() + i), compoundend, data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:1937:52: [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). rv = affix_check((word.c_str() + i), strlen(word.c_str() + i), 0, IN_CPD_END); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2496: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). rv = affix_check((word + i), strlen(word + i), compoundflag); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2503: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). rv = affix_check((word + i), strlen(word + i), compoundend); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2507: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). rv = affix_check((word + i), strlen(word + i), 0, IN_CPD_END); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2511:49: [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 = affix_check_morph((word + i), strlen(word + i), compoundflag); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2513:49: [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 = affix_check_morph((word + i), strlen(word + i), compoundend); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2603:47: [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 = affix_check_morph((word + i), strlen(word + i), compoundflag); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2605:47: [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 = affix_check_morph((word + i), strlen(word + i), compoundend); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:2624:44: [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). compound_check_morph((word + i), strlen(word + i), wordnum + 1, data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:3368: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 l1 = strlen(wlst[j].word); data/nuspell-3.0.0/src/hunspell/affixmgr.cxx:4784: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 condl = strlen(cond); data/nuspell-3.0.0/src/hunspell/csutil.cxx:302: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). size_t sl = strlen(s) + 1; data/nuspell-3.0.0/src/hunspell/hunspell.cxx:243: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). int nl = strlen(q); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:280: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). int nl = strlen((const char*)q); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:943: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). size_t slen = strlen(space + 1); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:1639:10: [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). p += strlen(attr); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:1641: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). return p + strlen(attr); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:1659: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). std::string cw = get_xml_par(p + strlen(tag) - 1); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:1769: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). len = strlen(word); data/nuspell-3.0.0/src/hunspell/hunspell.cxx:1880:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, d.c_str(), destsize); data/nuspell-3.0.0/src/hunspell/hunzip.cxx:82:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(in, 3) || data/nuspell-3.0.0/src/hunspell/hunzip.cxx:93:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(c), 1)) data/nuspell-3.0.0/src/hunspell/hunzip.cxx:104:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(c), 2)) data/nuspell-3.0.0/src/hunspell/hunzip.cxx:122:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(c), 2)) data/nuspell-3.0.0/src/hunspell/hunzip.cxx:132:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(reinterpret_cast<char*>(&l), 1)) data/nuspell-3.0.0/src/hunspell/hunzip.cxx:139:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (!fin.read(in, l / 8 + 1)) data/nuspell-3.0.0/src/hunspell/hunzip.cxx:180:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fin.read(in, BUFSIZE); data/nuspell-3.0.0/src/hunspell/hunzip.cxx:250: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). strcpy(linebuf + l - 1, line + strlen(line) - right - 1); data/nuspell-3.0.0/src/hunspell/phonet.cxx:82:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(word, inword.c_str(), MAXPHONETUTF8LEN); data/nuspell-3.0.0/src/hunspell/replist.cxx:122:7: [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(word) == dat[ind]->pattern.size()) data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:123: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). ckeyl = strlen(ckey); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:130: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). ctryl = strlen(ctry); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:337: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). int wl = strlen(word); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:406: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). int wl = strlen(word); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:415:52: [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 (r - word + reptable[i].pattern.size() == strlen(word)) data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:459: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). int wl = strlen(word); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:732: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). int wl = strlen(word); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:1033: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). int nc = strlen(word); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:1337: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(guess[i]); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:1422: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). len = strlen(rootsphon[i]); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:1961: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). int l1 = strlen(s1); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:1962: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). int l2 = strlen(s2); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:2046: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). return strlen(word); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:2093: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). m = strlen(s); data/nuspell-3.0.0/src/hunspell/suggestmgr.cxx:2094: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(s2); data/nuspell-3.0.0/src/nuspell/aff_data.cxx:352:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in.read(&bom[0], 3); data/nuspell-3.0.0/src/parsers/latexparser.cxx:188: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). head += strlen(PATTERN[pattern_num].pat[0]) - 1; data/nuspell-3.0.0/src/parsers/latexparser.cxx:221: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). head += strlen(PATTERN[pattern_num].pat[1]) - 1; data/nuspell-3.0.0/src/parsers/textparser.cxx:98:54: [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). while ((i < LATIN1_LEN) && strncmp(LATIN1[i], s, strlen(LATIN1[i]))) data/nuspell-3.0.0/src/parsers/textparser.cxx:118:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (unsigned int j = 0; j < strlen(wordchars); ++j) { data/nuspell-3.0.0/src/parsers/textparser.cxx:178: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). head += strlen(latin1); data/nuspell-3.0.0/src/parsers/textparser.cxx:183: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). head += strlen(latin1); data/nuspell-3.0.0/src/parsers/textparser.cxx:193: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). strncmp(line[actual].c_str() + head, UTF8_APOS, strlen(UTF8_APOS)) == data/nuspell-3.0.0/src/parsers/textparser.cxx:195:62: [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). is_wordchar(line[actual].c_str() + head + strlen(UTF8_APOS))) { data/nuspell-3.0.0/src/parsers/textparser.cxx:196: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). head += strlen(UTF8_APOS) - 1; data/nuspell-3.0.0/src/parsers/xmlparser.cxx:121: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). head += strlen(latin1); data/nuspell-3.0.0/src/parsers/xmlparser.cxx:128: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). head += strlen(latin1); data/nuspell-3.0.0/src/parsers/xmlparser.cxx:132: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). strlen(ENTITY_APOS)) == 0 && data/nuspell-3.0.0/src/parsers/xmlparser.cxx:133:62: [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). is_wordchar(line[actual].c_str() + head + strlen(ENTITY_APOS))) { data/nuspell-3.0.0/src/parsers/xmlparser.cxx:134: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). head += strlen(ENTITY_APOS) - 1; data/nuspell-3.0.0/src/parsers/xmlparser.cxx:139: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). strncmp(line[actual].c_str() + head, UTF8_APOS, strlen(UTF8_APOS)) == data/nuspell-3.0.0/src/parsers/xmlparser.cxx:141:62: [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). is_wordchar(line[actual].c_str() + head + strlen(UTF8_APOS))) { data/nuspell-3.0.0/src/parsers/xmlparser.cxx:142: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). head += strlen(UTF8_APOS) - 1; data/nuspell-3.0.0/src/parsers/xmlparser.cxx:160: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). head += strlen(PATTERN[pattern_num][1]) - 1; data/nuspell-3.0.0/src/tools/chmorph.cxx:94: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). r.append(pos + strlen(argv[4])); data/nuspell-3.0.0/src/tools/hunspell.cxx:372: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). char* dest = letters + strlen(letters); // append wordchars data/nuspell-3.0.0/src/tools/hunspell.cxx:459: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). } else if (((strlen(extension) == 3) && data/nuspell-3.0.0/src/tools/hunspell.cxx:461: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). ((strlen(extension) == 4) && (extension[0] == 'f') && data/nuspell-3.0.0/src/tools/hunspell.cxx:571: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). const char* p = s + strlen(s); data/nuspell-3.0.0/src/tools/hunspell.cxx:1699: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). buf.erase(buf.size() - strlen(HZIP_EXTENSION)); data/nuspell-3.0.0/src/tools/hunspell.cxx:1716: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(de->d_name); data/nuspell-3.0.0/src/tools/hzip.cxx:121:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((j = getc(f)) != -1 && (k = getc(f)) != -1) { data/nuspell-3.0.0/src/tools/hzip.cxx:121:38: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((j = getc(f)) != -1 && (k = getc(f)) != -1) { data/nuspell-3.0.0/src/tools/hzip.cxx:257:19: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((cx[0] = getc(f)) != -1 && (cx[1] = getc(f)) != -1) { data/nuspell-3.0.0/src/tools/hzip.cxx:257:46: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((cx[0] = getc(f)) != -1 && (cx[1] = getc(f)) != -1) { data/nuspell-3.0.0/src/tools/hzip.cxx:347:17: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t mask = umask(S_IXUSR | S_IRWXG | S_IRWXO); data/nuspell-3.0.0/src/tools/hzip.cxx:349:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(mask); data/nuspell-3.0.0/src/tools/munch.cxx:134: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). aff_chk(ep->word, strlen(ep->word)); data/nuspell-3.0.0/src/tools/munch.cxx:160: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). nwl = strlen(nword); data/nuspell-3.0.0/src/tools/munch.cxx:172: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). al = strlen(as); data/nuspell-3.0.0/src/tools/munch.cxx:328:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nptr->stripl = strlen(nptr->strip); data/nuspell-3.0.0/src/tools/munch.cxx:338:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nptr->appndl = strlen(nptr->appnd); data/nuspell-3.0.0/src/tools/munch.cxx:405: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). nc = strlen(cs); data/nuspell-3.0.0/src/tools/munch.cxx:572: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). int nwl = strlen(nword); data/nuspell-3.0.0/src/tools/munch.cxx:690: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). al = strlen(ep->affstr); data/nuspell-3.0.0/src/tools/munch.cxx:724:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tword, aent->appnd, MAX_WD_LEN - 1); data/nuspell-3.0.0/src/tools/munch.cxx:764:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tword, word, MAX_WD_LEN - 1); data/nuspell-3.0.0/src/tools/munch.cxx:803: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). int nwl = strlen(wlist[j].word); data/nuspell-3.0.0/src/tools/munch.cxx:827: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). int n = strlen(mp); data/nuspell-3.0.0/src/tools/munch.cxx:854: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). int sl = strlen(s) + 1; data/nuspell-3.0.0/src/tools/munch.cxx:863: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). int k = strlen(s); data/nuspell-3.0.0/src/tools/unmunch.cxx:133: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). al = strlen(ap); data/nuspell-3.0.0/src/tools/unmunch.cxx:139: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). int wl = strlen(ts); data/nuspell-3.0.0/src/tools/unmunch.cxx:242:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nptr->stripl = strlen(nptr->strip); data/nuspell-3.0.0/src/tools/unmunch.cxx:252:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nptr->appndl = strlen(nptr->appnd); data/nuspell-3.0.0/src/tools/unmunch.cxx:325: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). nc = strlen(cs); data/nuspell-3.0.0/src/tools/unmunch.cxx:485: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). int nwl = strlen(wlist[j].word); data/nuspell-3.0.0/src/tools/unmunch.cxx:509: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). int n = strlen(mp); data/nuspell-3.0.0/src/tools/unmunch.cxx:536: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). int sl = strlen(s) + 1; data/nuspell-3.0.0/src/tools/unmunch.cxx:545: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). int k = strlen(s); ANALYSIS SUMMARY: Hits = 279 Lines analyzed = 29187 in approximately 0.92 seconds (31854 lines/second) Physical Source Lines of Code (SLOC) = 23161 Hits@level = [0] 174 [1] 106 [2] 108 [3] 38 [4] 27 [5] 0 Hits@level+ = [0+] 453 [1+] 279 [2+] 173 [3+] 65 [4+] 27 [5+] 0 Hits/KSLOC@level+ = [0+] 19.5587 [1+] 12.0461 [2+] 7.46945 [3+] 2.80644 [4+] 1.16575 [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.