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/enchant-2-2.2.12/providers/enchant_voikko.c Examining data/enchant-2-2.2.12/providers/enchant_hunspell.cpp Examining data/enchant-2-2.2.12/providers/enchant_hspell.c Examining data/enchant-2-2.2.12/providers/enchant_zemberek.cpp Examining data/enchant-2-2.2.12/providers/enchant_aspell.c Examining data/enchant-2-2.2.12/providers/enchant_nuspell.cpp Examining data/enchant-2-2.2.12/lib/getopt-ext.h Examining data/enchant-2-2.2.12/lib/strchrnul.c Examining data/enchant-2-2.2.12/lib/strdup.c Examining data/enchant-2-2.2.12/lib/msvc-nothrow.h Examining data/enchant-2-2.2.12/lib/getopt_int.h Examining data/enchant-2-2.2.12/lib/getopt-core.h Examining data/enchant-2-2.2.12/lib/getopt-pfx-core.h Examining data/enchant-2-2.2.12/lib/sys_file.in.h Examining data/enchant-2-2.2.12/lib/unistd.in.h Examining data/enchant-2-2.2.12/lib/getopt.c Examining data/enchant-2-2.2.12/lib/relocatable.h Examining data/enchant-2-2.2.12/lib/getopt1.c Examining data/enchant-2-2.2.12/lib/gettext.h Examining data/enchant-2-2.2.12/lib/sys_types.in.h Examining data/enchant-2-2.2.12/lib/string.in.h Examining data/enchant-2-2.2.12/lib/malloc.c Examining data/enchant-2-2.2.12/lib/arg-nonnull.h Examining data/enchant-2-2.2.12/lib/getopt.in.h Examining data/enchant-2-2.2.12/lib/rawmemchr.c Examining data/enchant-2-2.2.12/lib/getopt-cdefs.in.h Examining data/enchant-2-2.2.12/lib/stdlib.in.h Examining data/enchant-2-2.2.12/lib/msvc-inval.h Examining data/enchant-2-2.2.12/lib/c++defs.h Examining data/enchant-2-2.2.12/lib/stddef.in.h Examining data/enchant-2-2.2.12/lib/msvc-inval.c Examining data/enchant-2-2.2.12/lib/relocatable.c Examining data/enchant-2-2.2.12/lib/warn-on-use.h Examining data/enchant-2-2.2.12/lib/msvc-nothrow.c Examining data/enchant-2-2.2.12/lib/unistd.c Examining data/enchant-2-2.2.12/lib/_Noreturn.h Examining data/enchant-2-2.2.12/lib/getopt-pfx-ext.h Examining data/enchant-2-2.2.12/lib/flock.c Examining data/enchant-2-2.2.12/lib/unused-parameter.h Examining data/enchant-2-2.2.12/src/enchant.c Examining data/enchant-2-2.2.12/src/pwl.c Examining data/enchant-2-2.2.12/src/lib.c Examining data/enchant-2-2.2.12/src/enchant.h Examining data/enchant-2-2.2.12/src/pwl.h Examining data/enchant-2-2.2.12/src/enchant++.h Examining data/enchant-2-2.2.12/src/enchant-lsmod.c Examining data/enchant-2-2.2.12/src/enchant-provider.h Examining data/enchant-2-2.2.12/tests/pwl/enchant_pwl_tests.cpp Examining data/enchant-2-2.2.12/tests/EnchantBrokerTestFixture.h Examining data/enchant-2-2.2.12/tests/mock_provider.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_describe_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_dict_exists_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_free_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_get_error_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_request_dict_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_init_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_free_dict_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_set_ordering_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_request_pwl_dict_tests.cpp Examining data/enchant-2-2.2.12/tests/broker/enchant_broker_list_dicts_tests.cpp Examining data/enchant-2-2.2.12/tests/provider/enchant_provider_get_user_config_dirs_tests.cpp Examining data/enchant-2-2.2.12/tests/provider/enchant_provider_get_user_language_tests.cpp Examining data/enchant-2-2.2.12/tests/provider/enchant_provider_broker_set_error_tests.cpp Examining data/enchant-2-2.2.12/tests/provider/enchant_provider_dict_set_error_tests.cpp Examining data/enchant-2-2.2.12/tests/provider/enchant_provider_get_prefix_dir_tests.cpp Examining data/enchant-2-2.2.12/tests/main.test.cpp Examining data/enchant-2-2.2.12/tests/mock_provider.h Examining data/enchant-2-2.2.12/tests/enchant_providers/Dictionary/dictionary_suggest.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/Dictionary/dictionary_check.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/providers.test.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/unittest_enchant_providers.h Examining data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_dictionary_exists.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_identify_dict.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_describe_dict.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_request_dict.cpp Examining data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_list_dicts.cpp Examining data/enchant-2-2.2.12/tests/EnchantDictionaryTestFixture.h Examining data/enchant-2-2.2.12/tests/EnchantTestFixture.h Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_get_extra_word_characters_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_remove_from_session_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_free_string_list_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_is_word_character_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_is_removed_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_add_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_remove_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_is_added_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_describe_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_add_to_session_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_get_error_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_check_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_store_replacement_tests.cpp Examining data/enchant-2-2.2.12/tests/dictionary/enchant_dict_suggest_tests.cpp FINAL RESULTS: data/enchant-2-2.2.12/lib/unistd.in.h:315:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_WARN_ON_USE (chown, "chdir is not always in <unistd.h> - " data/enchant-2-2.2.12/lib/unistd.in.h:332:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # undef chown data/enchant-2-2.2.12/lib/unistd.in.h:333:12: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # define chown rpl_chown data/enchant-2-2.2.12/lib/unistd.in.h:335:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_FUNCDECL_RPL (chown, int, (const char *file, uid_t uid, gid_t gid) data/enchant-2-2.2.12/lib/unistd.in.h:337:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIAS_RPL (chown, int, (const char *file, uid_t uid, gid_t gid)); data/enchant-2-2.2.12/lib/unistd.in.h:340:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_FUNCDECL_SYS (chown, int, (const char *file, uid_t uid, gid_t gid) data/enchant-2-2.2.12/lib/unistd.in.h:343:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIAS_SYS (chown, int, (const char *file, uid_t uid, gid_t gid)); data/enchant-2-2.2.12/lib/unistd.in.h:345:19: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_CXXALIASWARN (chown); data/enchant-2-2.2.12/lib/unistd.in.h:347:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. # undef chown data/enchant-2-2.2.12/lib/unistd.in.h:349:18: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. _GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and " data/enchant-2-2.2.12/lib/unistd.in.h:1520:12: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. # define readlink rpl_readlink data/enchant-2-2.2.12/lib/unistd.in.h:1522:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_FUNCDECL_RPL (readlink, ssize_t, data/enchant-2-2.2.12/lib/unistd.in.h:1526:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_CXXALIAS_RPL (readlink, ssize_t, data/enchant-2-2.2.12/lib/unistd.in.h:1531:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_FUNCDECL_SYS (readlink, ssize_t, data/enchant-2-2.2.12/lib/unistd.in.h:1536:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_CXXALIAS_SYS (readlink, ssize_t, data/enchant-2-2.2.12/lib/unistd.in.h:1540:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_CXXALIASWARN (readlink); data/enchant-2-2.2.12/lib/unistd.in.h:1542:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. # undef readlink data/enchant-2-2.2.12/lib/unistd.in.h:1544:18: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. _GL_WARN_ON_USE (readlink, "readlink is unportable - " data/enchant-2-2.2.12/lib/getopt.c:40:10: [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. # define fprintf __fxprintf_nocancel data/enchant-2-2.2.12/lib/relocatable.c:524:15: [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 (result, curr_prefix); data/enchant-2-2.2.12/lib/relocatable.c:540:15: [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 (result + curr_prefix_len, pathname_tail); data/enchant-2-2.2.12/lib/relocatable.c:570:15: [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 (result + 2, pathname); data/enchant-2-2.2.12/lib/stdlib.in.h:487:9: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). # undef mktemp data/enchant-2-2.2.12/lib/stdlib.in.h:488:10: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). # define mktemp _mktemp data/enchant-2-2.2.12/lib/unistd.in.h:270:11: [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. # undef access data/enchant-2-2.2.12/lib/unistd.in.h:271:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # define access rpl_access data/enchant-2-2.2.12/lib/unistd.in.h:273:19: [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. _GL_FUNCDECL_RPL (access, int, (const char *file, int mode) data/enchant-2-2.2.12/lib/unistd.in.h:275:19: [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. _GL_CXXALIAS_RPL (access, int, (const char *file, int mode)); data/enchant-2-2.2.12/lib/unistd.in.h:278:11: [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. # undef access data/enchant-2-2.2.12/lib/unistd.in.h:279:12: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # define access _access data/enchant-2-2.2.12/lib/unistd.in.h:281:19: [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. _GL_CXXALIAS_MDA (access, int, (const char *file, int mode)); data/enchant-2-2.2.12/lib/unistd.in.h:283:19: [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. _GL_CXXALIAS_SYS (access, int, (const char *file, int mode)); data/enchant-2-2.2.12/lib/unistd.in.h:285:19: [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. _GL_CXXALIASWARN (access); data/enchant-2-2.2.12/lib/unistd.in.h:287:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # undef access data/enchant-2-2.2.12/lib/unistd.in.h:290:18: [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. _GL_WARN_ON_USE (access, "access does not always support X_OK - " data/enchant-2-2.2.12/lib/unistd.in.h:296:9: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # undef access data/enchant-2-2.2.12/lib/unistd.in.h:297:10: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. # define access _access data/enchant-2-2.2.12/lib/unistd.in.h:568:9: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef execl data/enchant-2-2.2.12/lib/unistd.in.h:569:10: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define execl _execl data/enchant-2-2.2.12/lib/unistd.in.h:573:9: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef execle data/enchant-2-2.2.12/lib/unistd.in.h:574:10: [4] (shell) execle: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define execle _execle data/enchant-2-2.2.12/lib/unistd.in.h:578:9: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef execlp data/enchant-2-2.2.12/lib/unistd.in.h:579:10: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define execlp _execlp data/enchant-2-2.2.12/lib/unistd.in.h:584:9: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef execv data/enchant-2-2.2.12/lib/unistd.in.h:585:10: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define execv _execv data/enchant-2-2.2.12/lib/unistd.in.h:594:9: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # undef execvp data/enchant-2-2.2.12/lib/unistd.in.h:595:10: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. # define execvp _execvp data/enchant-2-2.2.12/lib/unistd.in.h:963:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_FUNCDECL_SYS (getlogin, char *, (void)); data/enchant-2-2.2.12/lib/unistd.in.h:965:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_CXXALIAS_SYS (getlogin, char *, (void)); data/enchant-2-2.2.12/lib/unistd.in.h:966:19: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_CXXALIASWARN (getlogin); data/enchant-2-2.2.12/lib/unistd.in.h:968:9: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. # undef getlogin data/enchant-2-2.2.12/lib/unistd.in.h:970:18: [4] (misc) getlogin: It's often easy to fool getlogin. Sometimes it does not work at all, because some program messed up the utmp file. Often, it gives only the first 8 characters of the login name. The user currently logged in on the controlling tty of our program need not be the user who started it. Avoid getlogin() for security-related purposes (CWE-807). Use getpwuid(geteuid()) and extract the desired information instead. _GL_WARN_ON_USE (getlogin, "getlogin is unportable - " data/enchant-2-2.2.12/lib/unistd.in.h:1111:11: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. # undef getpass data/enchant-2-2.2.12/lib/unistd.in.h:1112:12: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. # define getpass rpl_getpass data/enchant-2-2.2.12/lib/unistd.in.h:1114:19: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. _GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) data/enchant-2-2.2.12/lib/unistd.in.h:1116:19: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. _GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); data/enchant-2-2.2.12/lib/unistd.in.h:1119:19: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. _GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) data/enchant-2-2.2.12/lib/unistd.in.h:1122:19: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. _GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); data/enchant-2-2.2.12/lib/unistd.in.h:1124:19: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. _GL_CXXALIASWARN (getpass); data/enchant-2-2.2.12/lib/unistd.in.h:1126:9: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. # undef getpass data/enchant-2-2.2.12/lib/unistd.in.h:1128:18: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. _GL_WARN_ON_USE (getpass, "getpass is unportable - " data/enchant-2-2.2.12/providers/enchant_nuspell.cpp:98: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(word, suggest.c_str()); data/enchant-2-2.2.12/src/pwl.c:968:2: [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(matcher->word, pattern); data/enchant-2-2.2.12/lib/getopt-core.h:91:12: [3] (buffer) getopt: 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. extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) data/enchant-2-2.2.12/lib/getopt-ext.h:66:12: [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. extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, data/enchant-2-2.2.12/lib/getopt-pfx-core.h:40:9: [3] (buffer) getopt: 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. # undef getopt data/enchant-2-2.2.12/lib/getopt-pfx-core.h:45:10: [3] (buffer) getopt: 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. # define getopt __GETOPT_ID (getopt) data/enchant-2-2.2.12/lib/getopt-pfx-core.h:45:30: [3] (buffer) getopt: 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. # define getopt __GETOPT_ID (getopt) data/enchant-2-2.2.12/lib/getopt-pfx-ext.h:40:9: [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. # undef getopt_long data/enchant-2-2.2.12/lib/getopt-pfx-ext.h:44:10: [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. # define getopt_long __GETOPT_ID (getopt_long) data/enchant-2-2.2.12/lib/getopt-pfx-ext.h:44:35: [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. # define getopt_long __GETOPT_ID (getopt_long) data/enchant-2-2.2.12/lib/getopt.c:405:33: [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. else if (posixly_correct || !!getenv ("POSIXLY_CORRECT")) data/enchant-2-2.2.12/lib/getopt.c:736:14: [3] (buffer) getopt: 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. GETOPT_ENTRY(getopt, 0) data/enchant-2-2.2.12/lib/getopt.c:739:14: [3] (buffer) getopt: 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. GETOPT_ENTRY(getopt, 1) data/enchant-2-2.2.12/lib/getopt.c:758:11: [3] (buffer) getopt: 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. c = getopt (argc, argv, "abc:d:0123456789"); data/enchant-2-2.2.12/lib/getopt1.c:28:1: [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. getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, data/enchant-2-2.2.12/lib/getopt1.c:94:11: [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. c = getopt_long (argc, argv, "abc:d:0123456789", data/enchant-2-2.2.12/lib/relocatable.c:560:30: [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. const char *unixroot = getenv ("UNIXROOT"); data/enchant-2-2.2.12/lib/stdlib.in.h:635:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # undef random data/enchant-2-2.2.12/lib/stdlib.in.h:636:12: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # define random rpl_random data/enchant-2-2.2.12/lib/stdlib.in.h:638:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_FUNCDECL_RPL (random, long, (void)); data/enchant-2-2.2.12/lib/stdlib.in.h:639:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIAS_RPL (random, long, (void)); data/enchant-2-2.2.12/lib/stdlib.in.h:642:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_FUNCDECL_SYS (random, long, (void)); data/enchant-2-2.2.12/lib/stdlib.in.h:646:24: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIAS_SYS_CAST (random, long, (void)); data/enchant-2-2.2.12/lib/stdlib.in.h:648:19: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_CXXALIASWARN (random); data/enchant-2-2.2.12/lib/stdlib.in.h:650:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. # undef random data/enchant-2-2.2.12/lib/stdlib.in.h:652:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. _GL_WARN_ON_USE (random, "random is unportable - " data/enchant-2-2.2.12/lib/stdlib.in.h:660:11: [3] (random) srandom: 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. # undef srandom data/enchant-2-2.2.12/lib/stdlib.in.h:661:12: [3] (random) srandom: 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. # define srandom rpl_srandom data/enchant-2-2.2.12/lib/stdlib.in.h:663:19: [3] (random) srandom: 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. _GL_FUNCDECL_RPL (srandom, void, (unsigned int seed)); data/enchant-2-2.2.12/lib/stdlib.in.h:664:19: [3] (random) srandom: 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. _GL_CXXALIAS_RPL (srandom, void, (unsigned int seed)); data/enchant-2-2.2.12/lib/stdlib.in.h:667:19: [3] (random) srandom: 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. _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); data/enchant-2-2.2.12/lib/stdlib.in.h:671:24: [3] (random) srandom: 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. _GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed)); data/enchant-2-2.2.12/lib/stdlib.in.h:673:19: [3] (random) srandom: 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. _GL_CXXALIASWARN (srandom); data/enchant-2-2.2.12/lib/stdlib.in.h:675:9: [3] (random) srandom: 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. # undef srandom data/enchant-2-2.2.12/lib/stdlib.in.h:677:18: [3] (random) srandom: 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. _GL_WARN_ON_USE (srandom, "srandom is unportable - " data/enchant-2-2.2.12/lib/stdlib.in.h:716:11: [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. # undef setstate data/enchant-2-2.2.12/lib/stdlib.in.h:717:12: [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. # define setstate rpl_setstate data/enchant-2-2.2.12/lib/stdlib.in.h:719:19: [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. _GL_FUNCDECL_RPL (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); data/enchant-2-2.2.12/lib/stdlib.in.h:720:19: [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. _GL_CXXALIAS_RPL (setstate, char *, (char *arg_state)); data/enchant-2-2.2.12/lib/stdlib.in.h:723:19: [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. _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); data/enchant-2-2.2.12/lib/stdlib.in.h:727:24: [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. _GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state)); data/enchant-2-2.2.12/lib/stdlib.in.h:729:19: [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. _GL_CXXALIASWARN (setstate); data/enchant-2-2.2.12/lib/stdlib.in.h:731:9: [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. # undef setstate data/enchant-2-2.2.12/lib/stdlib.in.h:733:18: [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. _GL_WARN_ON_USE (setstate, "setstate is unportable - " data/enchant-2-2.2.12/lib/stdlib.in.h:902:12: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. # define realpath rpl_realpath data/enchant-2-2.2.12/lib/stdlib.in.h:904:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_FUNCDECL_RPL (realpath, char *, data/enchant-2-2.2.12/lib/stdlib.in.h:907:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_CXXALIAS_RPL (realpath, char *, data/enchant-2-2.2.12/lib/stdlib.in.h:911:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_FUNCDECL_SYS (realpath, char *, data/enchant-2-2.2.12/lib/stdlib.in.h:915:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_CXXALIAS_SYS (realpath, char *, data/enchant-2-2.2.12/lib/stdlib.in.h:918:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_CXXALIASWARN (realpath); data/enchant-2-2.2.12/lib/stdlib.in.h:920:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. # undef realpath data/enchant-2-2.2.12/lib/stdlib.in.h:922:18: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. _GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " data/enchant-2-2.2.12/src/enchant.c:425:20: [3] (buffer) getopt: 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 ((optchar = getopt (argc, argv, ":d:alvLmB")) != -1) { data/enchant-2-2.2.12/tests/EnchantTestFixture.h:64:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return getenv("ENCHANT_CONFIG_DIR"); data/enchant-2-2.2.12/tests/EnchantTestFixture.h:98:30: [3] (tmpfile) tempnam: Temporary file race condition (CWE-377). char* tempFileName = tempnam(".", prefix.c_str()); data/enchant-2-2.2.12/tests/provider/enchant_provider_get_user_config_dirs_tests.cpp:44:26: [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. std::string expected = getenv("ENCHANT_CONFIG_DIR"); data/enchant-2-2.2.12/lib/gettext.h:227: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/enchant-2-2.2.12/lib/gettext.h:229: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[1024]; data/enchant-2-2.2.12/lib/gettext.h:238: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/enchant-2-2.2.12/lib/gettext.h:240: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/enchant-2-2.2.12/lib/gettext.h: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 msg_ctxt_id[msgctxt_len + msgid_len]; data/enchant-2-2.2.12/lib/gettext.h: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 buf[1024]; data/enchant-2-2.2.12/lib/gettext.h:286: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 (msg_ctxt_id, msgctxt, msgctxt_len - 1); data/enchant-2-2.2.12/lib/gettext.h:288: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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len); data/enchant-2-2.2.12/lib/relocatable.c:148: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 (memory, orig_prefix_arg, orig_prefix_len + 1); data/enchant-2-2.2.12/lib/relocatable.c:151: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 (memory, curr_prefix_arg, curr_prefix_len + 1); data/enchant-2-2.2.12/lib/relocatable.c:233: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 (q, curr_pathname, p - curr_pathname); data/enchant-2-2.2.12/lib/relocatable.c:302: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 (computed_curr_prefix, curr_installdir, computed_curr_prefix_len); data/enchant-2-2.2.12/lib/relocatable.c:336:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char location[MAX_PATH]; data/enchant-2-2.2.12/lib/relocatable.c:362:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char location[CCHMAXPATH]; data/enchant-2-2.2.12/lib/relocatable.c:405:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen ("/proc/self/maps", "r"); data/enchant-2-2.2.12/lib/relocatable.c:539:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, curr_prefix, curr_prefix_len); data/enchant-2-2.2.12/lib/relocatable.c:569:15: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result, unixroot, 2); data/enchant-2-2.2.12/lib/stdlib.in.h:442:12: [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). # define mkstemp rpl_mkstemp data/enchant-2-2.2.12/lib/stdlib.in.h:444:19: [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). _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); data/enchant-2-2.2.12/lib/stdlib.in.h:445:19: [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). _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); data/enchant-2-2.2.12/lib/stdlib.in.h:448:19: [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). _GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); data/enchant-2-2.2.12/lib/stdlib.in.h:450:19: [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). _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); data/enchant-2-2.2.12/lib/stdlib.in.h:452:19: [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). _GL_CXXALIASWARN (mkstemp); data/enchant-2-2.2.12/lib/stdlib.in.h:454:9: [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). # undef mkstemp data/enchant-2-2.2.12/lib/stdlib.in.h:456:18: [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). _GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " data/enchant-2-2.2.12/lib/strdup.c:47:19: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char *) memcpy (new, s, len); data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:109:2: [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 word8[MAXWORDLEN + 1]; data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:135:2: [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 word8[MAXWORDLEN + 1]; data/enchant-2-2.2.12/src/pwl.c:243:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[BUFSIZ + 1]; data/enchant-2-2.2.12/lib/getopt.c:214: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). && namelen == strlen (p->name)) data/enchant-2-2.2.12/lib/getopt.c:301:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d->__nextchar += strlen (d->__nextchar); data/enchant-2-2.2.12/lib/gettext.h:223:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/enchant-2-2.2.12/lib/gettext.h:224: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). size_t msgid_len = strlen (msgid) + 1; data/enchant-2-2.2.12/lib/gettext.h:271:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t msgctxt_len = strlen (msgctxt) + 1; data/enchant-2-2.2.12/lib/gettext.h:272: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). size_t msgid_len = strlen (msgid) + 1; data/enchant-2-2.2.12/lib/relocatable.c:141: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). orig_prefix_len = strlen (orig_prefix_arg); data/enchant-2-2.2.12/lib/relocatable.c:142: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). curr_prefix_len = strlen (curr_prefix_arg); data/enchant-2-2.2.12/lib/relocatable.c:209:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix)) data/enchant-2-2.2.12/lib/relocatable.c:213: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). rel_installdir = orig_installdir + strlen (orig_installprefix); data/enchant-2-2.2.12/lib/relocatable.c:218:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *p = curr_pathname + strlen (curr_pathname); data/enchant-2-2.2.12/lib/relocatable.c:241:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const char *rp = rel_installdir + strlen (rel_installdir); data/enchant-2-2.2.12/lib/relocatable.c:242: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). const char *cp = curr_installdir + strlen (curr_installdir); data/enchant-2-2.2.12/lib/relocatable.c:419:26: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (c = getc (fp), c != EOF && c != '\n' && c != '/') data/enchant-2-2.2.12/lib/relocatable.c:438:22: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (c = getc (fp), c != EOF && c != '\n') data/enchant-2-2.2.12/lib/relocatable.c:518: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). char *result = (char *) xmalloc (strlen (curr_prefix) + 1); data/enchant-2-2.2.12/lib/relocatable.c:533: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). (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); data/enchant-2-2.2.12/lib/relocatable.c:564:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *result = (char *) xmalloc (2 + strlen (pathname) + 1); data/enchant-2-2.2.12/lib/strdup.c:41: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). size_t len = strlen (s) + 1; data/enchant-2-2.2.12/lib/string.in.h:425:11: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. # undef strncat data/enchant-2-2.2.12/lib/string.in.h:426:12: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. # define strncat rpl_strncat data/enchant-2-2.2.12/lib/string.in.h:428:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_FUNCDECL_RPL (strncat, char *, data/enchant-2-2.2.12/lib/string.in.h:431:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_CXXALIAS_RPL (strncat, char *, data/enchant-2-2.2.12/lib/string.in.h:434:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_CXXALIAS_SYS (strncat, char *, data/enchant-2-2.2.12/lib/string.in.h:438:19: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_CXXALIASWARN (strncat); data/enchant-2-2.2.12/lib/string.in.h:441:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. # undef strncat data/enchant-2-2.2.12/lib/string.in.h:443:18: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. _GL_WARN_ON_USE (strncat, "strncat is unportable - " data/enchant-2-2.2.12/lib/unistd.in.h:1487:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef read data/enchant-2-2.2.12/lib/unistd.in.h:1488:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read rpl_read data/enchant-2-2.2.12/lib/unistd.in.h:1490:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) data/enchant-2-2.2.12/lib/unistd.in.h:1492:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); data/enchant-2-2.2.12/lib/unistd.in.h:1495:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef read data/enchant-2-2.2.12/lib/unistd.in.h:1496:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read _read data/enchant-2-2.2.12/lib/unistd.in.h:1498:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, size_t count)); data/enchant-2-2.2.12/lib/unistd.in.h:1503:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); data/enchant-2-2.2.12/lib/unistd.in.h:1505:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). _GL_CXXALIASWARN (read); data/enchant-2-2.2.12/lib/unistd.in.h:1507:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef read data/enchant-2-2.2.12/lib/unistd.in.h:1508:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read _read data/enchant-2-2.2.12/lib/unistd.in.h:1853:11: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # undef usleep data/enchant-2-2.2.12/lib/unistd.in.h:1854:12: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # define usleep rpl_usleep data/enchant-2-2.2.12/lib/unistd.in.h:1856:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); data/enchant-2-2.2.12/lib/unistd.in.h:1857:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); data/enchant-2-2.2.12/lib/unistd.in.h:1860:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); data/enchant-2-2.2.12/lib/unistd.in.h:1864:24: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIAS_SYS_CAST (usleep, int, (useconds_t n)); data/enchant-2-2.2.12/lib/unistd.in.h:1866:19: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_CXXALIASWARN (usleep); data/enchant-2-2.2.12/lib/unistd.in.h:1868:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. # undef usleep data/enchant-2-2.2.12/lib/unistd.in.h:1870:18: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. _GL_WARN_ON_USE (usleep, "usleep is unportable - " data/enchant-2-2.2.12/providers/enchant_aspell.c:56: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). int val = aspell_speller_check (manager, normalizedWord, strlen(normalizedWord)); data/enchant-2-2.2.12/providers/enchant_aspell.c:76:85: [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 AspellWordList *word_list = aspell_speller_suggest (manager, normalizedWord, strlen(normalizedWord)); data/enchant-2-2.2.12/providers/enchant_hspell.c:65: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). strlen (sugg), data/enchant-2-2.2.12/providers/enchant_hspell.c:128:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(!((strlen(tag) >= 2) && tag[0] == 'h' && tag[1] == 'e')) data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:111: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). size_t len_in = strlen(in); data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:137: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). size_t len_in = strlen(in); data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:151: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). len_in = strlen(in); data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:245:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dic_suffix_len = strlen(dic_suffix); data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:246: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). size_t dir_entry_len = strlen(dir_entry); data/enchant-2-2.2.12/providers/enchant_hunspell.cpp:247: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). size_t tag_len = strlen(tag); data/enchant-2-2.2.12/providers/enchant_nuspell.cpp:192: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). size_t dic_suffix_len = strlen(dic_suffix); data/enchant-2-2.2.12/providers/enchant_nuspell.cpp:193: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 dir_entry_len = strlen(dir_entry); data/enchant-2-2.2.12/providers/enchant_nuspell.cpp:194: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). size_t tag_len = strlen(tag); data/enchant-2-2.2.12/providers/enchant_voikko.c:123: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 (strncmp (tag, voikko_langs[i], strlen (tag)) == 0) { data/enchant-2-2.2.12/src/enchant.c:95:22: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while (ret && (ch = fgetc (in)) != EOF) { data/enchant-2-2.2.12/src/enchant.c:342:31: [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 *mis = str->str + strlen(prefix); data/enchant-2-2.2.12/src/enchant.c:345: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). ssize_t cor_len = strlen(str->str) - (cor - str->str); data/enchant-2-2.2.12/src/lib.c:425: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/enchant-2-2.2.12/src/lib.c:486: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). size_t sugg_len = strlen(suggs[i]); data/enchant-2-2.2.12/src/lib.c:509: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/enchant-2-2.2.12/src/lib.c:572: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/enchant-2-2.2.12/src/lib.c:593: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/enchant-2-2.2.12/src/lib.c:613: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/enchant-2-2.2.12/src/lib.c:631: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/enchant-2-2.2.12/src/lib.c:653: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/enchant-2-2.2.12/src/lib.c:671: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/enchant-2-2.2.12/src/lib.c:692: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). mis_len = strlen (mis); data/enchant-2-2.2.12/src/lib.c:695: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). cor_len = strlen (cor); data/enchant-2-2.2.12/src/lib.c:802:31: [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 g_module_suffix_len = strlen (G_MODULE_SUFFIX); data/enchant-2-2.2.12/src/lib.c:809: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). size_t entry_len = strlen (dir_entry); data/enchant-2-2.2.12/src/lib.c:1040:31: [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). g_return_val_if_fail (pwl && strlen(pwl), NULL); data/enchant-2-2.2.12/src/lib.c:1118:31: [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). g_return_val_if_fail (tag && strlen(tag), NULL); data/enchant-2-2.2.12/src/lib.c:1300:31: [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). g_return_val_if_fail (tag && strlen(tag), 0); data/enchant-2-2.2.12/src/lib.c:1401: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). g_return_if_fail (tag && strlen(tag)); data/enchant-2-2.2.12/src/lib.c:1402: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). g_return_if_fail (ordering && strlen(ordering)); data/enchant-2-2.2.12/src/lib.c:1409: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). if (tag_dupl && strlen(tag_dupl) && data/enchant-2-2.2.12/src/lib.c:1410:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ordering_dupl && strlen(ordering_dupl)) data/enchant-2-2.2.12/src/pwl.c:251: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). if(line[strlen(line)-1] != '\n' && !feof(f)) /* ignore lines longer than BUFSIZ. */ data/enchant-2-2.2.12/src/pwl.c:256: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). if (line[strlen(buffer)-1]=='\n') data/enchant-2-2.2.12/src/pwl.c:266:42: [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). enchant_pwl_add_to_trie(pwl, line, strlen(line)); data/enchant-2-2.2.12/src/pwl.c:339:15: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getc (f); data/enchant-2-2.2.12/src/pwl.c:541: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). exists = enchant_pwl_contains(pwl, lower_case_word, strlen(lower_case_word)); data/enchant-2-2.2.12/src/pwl.c:549:57: [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). exists = enchant_pwl_contains(pwl, title_case_word, strlen(title_case_word)); data/enchant-2-2.2.12/src/pwl.c:579: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). size_t suggestion_len = strlen(suggestion); data/enchant-2-2.2.12/src/pwl.c:832:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t word_len = strlen(matcher->word); data/enchant-2-2.2.12/src/pwl.c:881: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). enchant_trie_matcher_poppath(matcher,strlen(nxtChS)); data/enchant-2-2.2.12/src/pwl.c:923:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). enchant_trie_matcher_poppath(matcher,strlen(key)); data/enchant-2-2.2.12/src/pwl.c:937:41: [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). enchant_trie_matcher_poppath(matcher,strlen(key2)); data/enchant-2-2.2.12/src/pwl.c:938:41: [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). enchant_trie_matcher_poppath(matcher,strlen(key)); data/enchant-2-2.2.12/src/pwl.c:955: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). len = strlen(normalized_word); data/enchant-2-2.2.12/src/pwl.c:991: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). ssize_t len = strlen(newchars); data/enchant-2-2.2.12/tests/EnchantDictionaryTestFixture.h:180:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(read(fd, &c, 1) == 1 && !hasContents){ data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_describe_dict.cpp:61: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). CHECK(strlen((*_provider->describe)(_provider)) != 0); data/enchant-2-2.2.12/tests/enchant_providers/Provider/provider_identify_dict.cpp:61: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). CHECK(strlen((*_provider->identify)(_provider)) != 0); data/enchant-2-2.2.12/tests/enchant_providers/providers.test.cpp:102:34: [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 g_module_suffix_len = strlen (G_MODULE_SUFFIX); data/enchant-2-2.2.12/tests/enchant_providers/providers.test.cpp:108: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). size_t entry_len = strlen (dir_entry); data/enchant-2-2.2.12/tests/provider/enchant_provider_get_user_language_tests.cpp:87:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). CHECK(strncmp(language, userLanguage, strlen(language)) == 0); data/enchant-2-2.2.12/tests/provider/enchant_provider_get_user_language_tests.cpp:88:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(userLanguage) > 2) ANALYSIS SUMMARY: Hits = 251 Lines analyzed = 23208 in approximately 0.65 seconds (35747 lines/second) Physical Source Lines of Code (SLOC) = 15411 Hits@level = [0] 67 [1] 105 [2] 29 [3] 54 [4] 45 [5] 18 Hits@level+ = [0+] 318 [1+] 251 [2+] 146 [3+] 117 [4+] 63 [5+] 18 Hits/KSLOC@level+ = [0+] 20.6346 [1+] 16.2871 [2+] 9.47375 [3+] 7.59198 [4+] 4.08799 [5+] 1.168 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.