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/ccrypt-1.11/check/crypt3-check.c Examining data/ccrypt-1.11/check/rijndael-alg-ref.c Examining data/ccrypt-1.11/check/rijndael-check.c Examining data/ccrypt-1.11/check/rijndael-alg-ref.h Examining data/ccrypt-1.11/intl/version.c Examining data/ccrypt-1.11/intl/localcharset.h Examining data/ccrypt-1.11/intl/hash-string.c Examining data/ccrypt-1.11/intl/bindtextdom.c Examining data/ccrypt-1.11/intl/vasnprintf.c Examining data/ccrypt-1.11/intl/gmo.h Examining data/ccrypt-1.11/intl/dcgettext.c Examining data/ccrypt-1.11/intl/threadlib.c Examining data/ccrypt-1.11/intl/gettext.c Examining data/ccrypt-1.11/intl/eval-plural.h Examining data/ccrypt-1.11/intl/textdomain.c Examining data/ccrypt-1.11/intl/dcngettext.c Examining data/ccrypt-1.11/intl/l10nflist.c Examining data/ccrypt-1.11/intl/localename.c Examining data/ccrypt-1.11/intl/plural-exp.c Examining data/ccrypt-1.11/intl/os2compat.c Examining data/ccrypt-1.11/intl/vasnprintf.h Examining data/ccrypt-1.11/intl/finddomain.c Examining data/ccrypt-1.11/intl/plural-exp.h Examining data/ccrypt-1.11/intl/vasnwprintf.h Examining data/ccrypt-1.11/intl/tsearch.c Examining data/ccrypt-1.11/intl/hash-string.h Examining data/ccrypt-1.11/intl/lock.c Examining data/ccrypt-1.11/intl/lock.h Examining data/ccrypt-1.11/intl/printf-parse.c Examining data/ccrypt-1.11/intl/osdep.c Examining data/ccrypt-1.11/intl/export.h Examining data/ccrypt-1.11/intl/loadmsgcat.c Examining data/ccrypt-1.11/intl/relocatable.h Examining data/ccrypt-1.11/intl/explodename.c Examining data/ccrypt-1.11/intl/dcigettext.c Examining data/ccrypt-1.11/intl/xsize.c Examining data/ccrypt-1.11/intl/ngettext.c Examining data/ccrypt-1.11/intl/libgnuintl.in.h Examining data/ccrypt-1.11/intl/plural.c Examining data/ccrypt-1.11/intl/verify.h Examining data/ccrypt-1.11/intl/langprefs.c Examining data/ccrypt-1.11/intl/localcharset.c Examining data/ccrypt-1.11/intl/loadinfo.h Examining data/ccrypt-1.11/intl/dgettext.c Examining data/ccrypt-1.11/intl/printf-parse.h Examining data/ccrypt-1.11/intl/gettextP.h Examining data/ccrypt-1.11/intl/dngettext.c Examining data/ccrypt-1.11/intl/relocatable.c Examining data/ccrypt-1.11/intl/intl-exports.c Examining data/ccrypt-1.11/intl/intl-compat.c Examining data/ccrypt-1.11/intl/log.c Examining data/ccrypt-1.11/intl/os2compat.h Examining data/ccrypt-1.11/intl/printf-args.h Examining data/ccrypt-1.11/intl/printf-args.c Examining data/ccrypt-1.11/intl/wprintf-parse.h Examining data/ccrypt-1.11/intl/xsize.h Examining data/ccrypt-1.11/intl/localealias.c Examining data/ccrypt-1.11/intl/tsearch.h Examining data/ccrypt-1.11/intl/printf.c Examining data/ccrypt-1.11/intl/setlocale.c Examining data/ccrypt-1.11/src/platform.c Examining data/ccrypt-1.11/src/readkey.c Examining data/ccrypt-1.11/src/traverse.h Examining data/ccrypt-1.11/src/ccguess.c Examining data/ccrypt-1.11/src/xalloc.c Examining data/ccrypt-1.11/src/tables.h Examining data/ccrypt-1.11/src/lists.h Examining data/ccrypt-1.11/src/rijndael.h Examining data/ccrypt-1.11/src/main.c Examining data/ccrypt-1.11/src/xalloc.h Examining data/ccrypt-1.11/src/ccrypt.h Examining data/ccrypt-1.11/src/platform.h Examining data/ccrypt-1.11/src/unixcryptlib.c Examining data/ccrypt-1.11/src/ccryptlib.c Examining data/ccrypt-1.11/src/ccrypt.c Examining data/ccrypt-1.11/src/main.h Examining data/ccrypt-1.11/src/traverse.c Examining data/ccrypt-1.11/src/maketables.c Examining data/ccrypt-1.11/src/rijndael.c Examining data/ccrypt-1.11/src/unixcryptlib.h Examining data/ccrypt-1.11/src/ccryptlib.h Examining data/ccrypt-1.11/src/getopt.c Examining data/ccrypt-1.11/src/tables.c Examining data/ccrypt-1.11/src/gettext.h Examining data/ccrypt-1.11/src/getopt1.c Examining data/ccrypt-1.11/src/unixcrypt3.h Examining data/ccrypt-1.11/src/unixcrypt3.c Examining data/ccrypt-1.11/src/readkey.h Examining data/ccrypt-1.11/src/include/getopt/getopt.h FINAL RESULTS: data/ccrypt-1.11/src/traverse.c:319:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(infile, buf.st_mode | S_IWUSR); data/ccrypt-1.11/check/crypt3-check.c:73:11: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. p = crypt(key, salt); data/ccrypt-1.11/intl/dcigettext.c:797: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 (new_localename, localename); data/ccrypt-1.11/intl/langprefs.c:297:29: [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 (p, buf); data/ccrypt-1.11/intl/libgnuintl.in.h:326:15: [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. #if !(defined fprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:327:8: [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. #undef fprintf data/ccrypt-1.11/intl/libgnuintl.in.h:328:9: [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 libintl_fprintf data/ccrypt-1.11/intl/libgnuintl.in.h:329:12: [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. extern int fprintf (FILE *, const char *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:331:15: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined vfprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:332:8: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vfprintf data/ccrypt-1.11/intl/libgnuintl.in.h:333:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vfprintf libintl_vfprintf data/ccrypt-1.11/intl/libgnuintl.in.h:334:12: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vfprintf (FILE *, const char *, va_list); data/ccrypt-1.11/intl/libgnuintl.in.h:337:15: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined printf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:338:8: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef printf data/ccrypt-1.11/intl/libgnuintl.in.h:351:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define printf libintl_printf data/ccrypt-1.11/intl/libgnuintl.in.h:352:12: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int printf (const char *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:354:15: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #if !(defined vprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:355:8: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vprintf data/ccrypt-1.11/intl/libgnuintl.in.h:356:9: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vprintf libintl_vprintf data/ccrypt-1.11/intl/libgnuintl.in.h:357:12: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vprintf (const char *, va_list); data/ccrypt-1.11/intl/libgnuintl.in.h:360:15: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #if !(defined sprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:361:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef sprintf data/ccrypt-1.11/intl/libgnuintl.in.h:362:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define sprintf libintl_sprintf data/ccrypt-1.11/intl/libgnuintl.in.h:363:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. extern int sprintf (char *, const char *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:365:15: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #if !(defined vsprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:366:8: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef vsprintf data/ccrypt-1.11/intl/libgnuintl.in.h:367:9: [4] (buffer) vsprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define vsprintf libintl_vsprintf data/ccrypt-1.11/intl/libgnuintl.in.h:368:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. extern int vsprintf (char *, const char *, va_list); data/ccrypt-1.11/intl/libgnuintl.in.h:373:15: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #if !(defined snprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:374:8: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #undef snprintf data/ccrypt-1.11/intl/libgnuintl.in.h:375:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf libintl_snprintf data/ccrypt-1.11/intl/libgnuintl.in.h:376:12: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. extern int snprintf (char *, size_t, const char *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:378:15: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #if !(defined vsnprintf && defined _GL_STDIO_H) /* don't override gnulib */ data/ccrypt-1.11/intl/libgnuintl.in.h:379:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #undef vsnprintf data/ccrypt-1.11/intl/libgnuintl.in.h:380:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define vsnprintf libintl_vsnprintf data/ccrypt-1.11/intl/libgnuintl.in.h:381:12: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. extern int vsnprintf (char *, size_t, const char *, va_list); data/ccrypt-1.11/intl/libgnuintl.in.h:403:8: [4] (format) fwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef fwprintf data/ccrypt-1.11/intl/libgnuintl.in.h:404:9: [4] (format) fwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define fwprintf libintl_fwprintf data/ccrypt-1.11/intl/libgnuintl.in.h:405:12: [4] (format) fwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int fwprintf (FILE *, const wchar_t *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:406:8: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vfwprintf data/ccrypt-1.11/intl/libgnuintl.in.h:407:9: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vfwprintf libintl_vfwprintf data/ccrypt-1.11/intl/libgnuintl.in.h:408:12: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vfwprintf (FILE *, const wchar_t *, va_list); data/ccrypt-1.11/intl/libgnuintl.in.h:410:8: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef wprintf data/ccrypt-1.11/intl/libgnuintl.in.h:411:9: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define wprintf libintl_wprintf data/ccrypt-1.11/intl/libgnuintl.in.h:412:12: [4] (format) wprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int wprintf (const wchar_t *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:413:8: [4] (format) vwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #undef vwprintf data/ccrypt-1.11/intl/libgnuintl.in.h:414:9: [4] (format) vwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define vwprintf libintl_vwprintf data/ccrypt-1.11/intl/libgnuintl.in.h:415:12: [4] (format) vwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. extern int vwprintf (const wchar_t *, va_list); data/ccrypt-1.11/intl/libgnuintl.in.h:417:8: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef swprintf data/ccrypt-1.11/intl/libgnuintl.in.h:418:9: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define swprintf libintl_swprintf data/ccrypt-1.11/intl/libgnuintl.in.h:419:12: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. extern int swprintf (wchar_t *, size_t, const wchar_t *, ...); data/ccrypt-1.11/intl/libgnuintl.in.h:420:8: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef vswprintf data/ccrypt-1.11/intl/libgnuintl.in.h:421:9: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #define vswprintf libintl_vswprintf data/ccrypt-1.11/intl/libgnuintl.in.h:422:12: [4] (format) vswprintf: Potential format string problem (CWE-134). Make format string constant. extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list); data/ccrypt-1.11/intl/localcharset.c:239:23: [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 (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); data/ccrypt-1.11/intl/localcharset.c:240:23: [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 (res_ptr + res_size - (l2 + 1), buf2); data/ccrypt-1.11/intl/localcharset.c:511:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "CP%s", pdot + 1); data/ccrypt-1.11/intl/localename.c:1360: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 (name, legacy_table[i1].unixy); data/ccrypt-1.11/intl/localename.c:1384: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 (name, langtag_table[i1].unixy); data/ccrypt-1.11/intl/localename.c:1404: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 (name + 3, script_table[i1].unixy); data/ccrypt-1.11/intl/localename.c:2583: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 (last_locale, locale_name); data/ccrypt-1.11/intl/log.c:88: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 (last_logfilename, logfilename); data/ccrypt-1.11/intl/os2compat.c:95: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 (libintl_nl_default_dirname, _nlos2_localedir); data/ccrypt-1.11/intl/plural.c:719:21: [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 YYFPRINTF fprintf data/ccrypt-1.11/intl/printf.c:99:12: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. return vfprintf (stream, format, args); data/ccrypt-1.11/intl/printf.c:159:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return vsprintf (resultbuf, format, args); data/ccrypt-1.11/intl/printf.c:198:29: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define system_vsnprintf vsnprintf data/ccrypt-1.11/intl/printf.c:204:28: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define system_vsnprintf vsnprintf data/ccrypt-1.11/intl/printf.c:318:28: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define system_vswprintf vswprintf data/ccrypt-1.11/intl/printf.c:326:12: [4] (format) vfwprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. return vfwprintf (stream, format, args); data/ccrypt-1.11/intl/relocatable.c:519: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/ccrypt-1.11/intl/relocatable.c:535: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/ccrypt-1.11/intl/relocatable.c:553: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, unixroot); data/ccrypt-1.11/intl/relocatable.c:554: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/ccrypt-1.11/intl/setlocale.c:712: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 (ll_buf + (underscore - llCC_buf), territory_end); data/ccrypt-1.11/intl/vasnprintf.c:162:20: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define SNPRINTF swprintf data/ccrypt-1.11/intl/vasnprintf.c:180:21: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF snprintf data/ccrypt-1.11/intl/vasnprintf.c:182:11: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef snprintf data/ccrypt-1.11/intl/vasnprintf.c:184:21: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF _snprintf data/ccrypt-1.11/intl/vasnprintf.c:188:20: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define SNPRINTF snprintf data/ccrypt-1.11/intl/vasnprintf.c:190:10: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # undef snprintf data/ccrypt-1.11/intl/vasnprintf.c:194:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef sprintf data/ccrypt-1.11/intl/vasnprintf.c:4256:39: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ((char *) p, decimal_format, exponent); data/ccrypt-1.11/intl/vasnprintf.c:4264:39: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (expbuf, decimal_format, exponent); data/ccrypt-1.11/intl/vasnprintf.c:4449:47: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ((char *) p, decimal_format, exponent); data/ccrypt-1.11/intl/vasnprintf.c:4457:47: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (expbuf, decimal_format, exponent); data/ccrypt-1.11/intl/vasnprintf.c:4969:33: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, arg); \ data/ccrypt-1.11/intl/vasnprintf.c:4972:33: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], arg); \ data/ccrypt-1.11/intl/vasnprintf.c:4975:33: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ data/ccrypt-1.11/intl/vasnprintf.h:35:22: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define __printf__ printf data/ccrypt-1.11/src/ccguess.c:155: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(buf+i+1, s+i); data/ccrypt-1.11/src/ccguess.c:177: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(buf, s); data/ccrypt-1.11/src/ccguess.c:199: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(buf, s); data/ccrypt-1.11/src/ccguess.c:223: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(buf+i, s+i+1); data/ccrypt-1.11/src/ccrypt.c:94: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(key2, key); data/ccrypt-1.11/src/ccryptlib.c:85:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(acc, "%s,%ld,%ld,%ld,%d", host, (long)tv.tv_sec, (long)tv.tv_usec, data/ccrypt-1.11/src/platform.c:62:9: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). p = mktemp(template); data/ccrypt-1.11/src/traverse.c:200: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 (strbuf, dirname); data/ccrypt-1.11/src/traverse.c:202:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (strbuf, dirent->d_name); data/ccrypt-1.11/src/traverse.c:483: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(tmpfile, outfile); data/ccrypt-1.11/src/traverse.c:757: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(buffer, infile); data/ccrypt-1.11/src/traverse.c:758:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buffer, cmd.suffix); data/ccrypt-1.11/src/unixcrypt3.c:627:14: [4] (crypto) crypt_r: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. static char *crypt_r (const char *key, const char *salt, struct crypt_data *data) data/ccrypt-1.11/src/unixcrypt3.c:671:10: [4] (crypto) crypt_r: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. return crypt_r (key, salt, &data); data/ccrypt-1.11/src/unixcryptlib.c:29:11: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. #define crypt crypt_replacement data/ccrypt-1.11/src/unixcryptlib.c:55:7: [4] (crypto) crypt: The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment (CWE-327). Use a different algorithm, such as SHA-256, with a larger, non-repeating salt. p = crypt(key, salt1); data/ccrypt-1.11/check/crypt3-check.c:54:3: [3] (random) srand: 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. srand(seed); data/ccrypt-1.11/check/rijndael-check.c:37:3: [3] (random) srand: 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. srand(seed); data/ccrypt-1.11/intl/bindtextdom.c:327: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/ccrypt-1.11/intl/dcigettext.c:141:7: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. char *getwd (); data/ccrypt-1.11/intl/dcigettext.c:142:28: [3] (buffer) getwd: This does not protect against buffer overflows by itself, so use with caution (CWE-120, CWE-20). Use getcwd instead. # define getcwd(buf, max) getwd (buf) data/ccrypt-1.11/intl/dcigettext.c:864: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. const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED"); data/ccrypt-1.11/intl/dcigettext.c:1587: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. language = getenv ("LANGUAGE"); data/ccrypt-1.11/intl/dcigettext.c:1627: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. const char *value = getenv ("OUTPUT_CHARSET"); data/ccrypt-1.11/intl/langprefs.c:327:31: [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 (!cache_initialized && getenv ("GETTEXT_MUI") != NULL) data/ccrypt-1.11/intl/localcharset.c:138:13: [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. dir = getenv ("CHARSETALIASDIR"); data/ccrypt-1.11/intl/localcharset.c:414: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. locale = getenv ("LC_ALL"); data/ccrypt-1.11/intl/localcharset.c:417:20: [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. locale = getenv ("LC_CTYPE"); data/ccrypt-1.11/intl/localcharset.c:419:22: [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. locale = getenv ("LANG"); data/ccrypt-1.11/intl/localcharset.c:475: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. locale = getenv ("LC_ALL"); data/ccrypt-1.11/intl/localcharset.c:478:20: [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. locale = getenv ("LC_CTYPE"); data/ccrypt-1.11/intl/localcharset.c:480:22: [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. locale = getenv ("LANG"); data/ccrypt-1.11/intl/localcharset.c:536:12: [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. locale = getenv ("LC_ALL"); data/ccrypt-1.11/intl/localcharset.c:539: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. locale = getenv ("LC_CTYPE"); data/ccrypt-1.11/intl/localcharset.c:541:18: [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. locale = getenv ("LANG"); data/ccrypt-1.11/intl/localename.c:1464:7: [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 ("GETTEXT_MUI") != NULL) data/ccrypt-1.11/intl/localename.c:2823:12: [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. retval = getenv ("LC_ALL"); data/ccrypt-1.11/intl/localename.c:2827:12: [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. retval = getenv (categoryname); data/ccrypt-1.11/intl/localename.c:2831:12: [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. retval = getenv ("LANG"); data/ccrypt-1.11/intl/lock.c:639:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:657:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:776:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:797:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:827:15: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:851:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:880:15: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:895:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:957:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:979:9: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/ccrypt-1.11/intl/lock.c:1026:11: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&once_control->lock); data/ccrypt-1.11/intl/lock.c:1027:11: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&once_control->lock); data/ccrypt-1.11/intl/lock.c:1046:15: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&once_control->lock); data/ccrypt-1.11/intl/os2compat.c:49: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. char *root = getenv ("UNIXROOT"); data/ccrypt-1.11/intl/os2compat.c:50: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. char *gnulocaledir = getenv ("GNULOCALEDIR"); data/ccrypt-1.11/intl/os2compat.h:41: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. #define getenv _nl_getenv data/ccrypt-1.11/intl/relocatable.c:544: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/ccrypt-1.11/src/ccguess.c:519:15: [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(ac, av, shortopts, longopts, NULL)) != -1) { data/ccrypt-1.11/src/getopt.c:211: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. #ifndef getenv data/ccrypt-1.11/src/getopt.c:212: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. extern char *getenv (); data/ccrypt-1.11/src/getopt.c:404: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. posixly_correct = getenv ("POSIXLY_CORRECT"); data/ccrypt-1.11/src/getopt.c:979:1: [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 (argc, argv, optstring) data/ccrypt-1.11/src/getopt.c:1009: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/ccrypt-1.11/src/getopt1.c:67: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 (argc, argv, options, long_options, opt_index) data/ccrypt-1.11/src/getopt1.c:123: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/ccrypt-1.11/src/include/getopt/getopt.h:148: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/ccrypt-1.11/src/include/getopt/getopt.h:150: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 (); data/ccrypt-1.11/src/include/getopt/getopt.h:154: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 *const *argv, const char *shortopts, data/ccrypt-1.11/src/include/getopt/getopt.h:167: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 (); data/ccrypt-1.11/src/include/getopt/getopt.h:169: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 (); data/ccrypt-1.11/src/main.c:230:15: [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(ac, av, shortopts, longopts, NULL)) != -1) { data/ccrypt-1.11/src/main.c:255:11: [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. p = getenv(optarg); data/ccrypt-1.11/check/crypt3-check.c:47: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 salt[2]; data/ccrypt-1.11/check/crypt3-check.c:48: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 key[8]; data/ccrypt-1.11/check/crypt3-check.c:49: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 res1[13]; data/ccrypt-1.11/check/crypt3-check.c:50: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 res2[13]; data/ccrypt-1.11/intl/bindtextdom.c:136:4: [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, dirname, len); data/ccrypt-1.11/intl/bindtextdom.c:174: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, codeset, len); data/ccrypt-1.11/intl/bindtextdom.c:208: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 (new_binding->domainname, domainname, len); data/ccrypt-1.11/intl/bindtextdom.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 (result, dirname, len); data/ccrypt-1.11/intl/bindtextdom.c:262:8: [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, codeset, len); data/ccrypt-1.11/intl/bindtextdom.c:322: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 dirname_with_drive[_MAX_PATH]; data/ccrypt-1.11/intl/bindtextdom.c:336: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 (dirname_with_drive, unixroot, 2); data/ccrypt-1.11/intl/bindtextdom.c:337: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 (dirname_with_drive + 2, dirname, len); data/ccrypt-1.11/intl/dcigettext.c:266:7: [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 appended[ZERO]; /* used if domain != NULL */ data/ccrypt-1.11/intl/dcigettext.c:419: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 data[ZERO]; data/ccrypt-1.11/intl/dcigettext.c:794: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 (new_domainname, domainname, domainname_len + 1); data/ccrypt-1.11/intl/dcigettext.c:1134: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 (charset, charsetstr, len); data/ccrypt-1.11/intl/dcigettext.c:1173:6: [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, outcharset, len); data/ccrypt-1.11/intl/dcigettext.c:1174:6: [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 + len, "//TRANSLIT", 10 + 1); data/ccrypt-1.11/intl/dcigettext.c:1635: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 (value_copy, value, len); data/ccrypt-1.11/intl/dcigettext.c:1677:29: [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 (void *) ((char *) memcpy (dest, src, n) + n); data/ccrypt-1.11/intl/finddomain.c:137: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 (locale, alias_value, len); data/ccrypt-1.11/intl/gettextP.h:216: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 domainname[ZERO]; data/ccrypt-1.11/intl/l10nflist.c:209: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 (cp, dirlist, dirlist_len); data/ccrypt-1.11/intl/langprefs.c:174:7: [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 data[8 + 1]; data/ccrypt-1.11/intl/langprefs.c:252:13: [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[256]; data/ccrypt-1.11/intl/loadmsgcat.c:471: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). # define open(name, flags) open_not_cancel_2 (name, flags) data/ccrypt-1.11/intl/loadmsgcat.c:833: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). fd = open (domain_file->filename, O_RDONLY | O_BINARY); data/ccrypt-1.11/intl/loadmsgcat.c:1188:10: [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 (mem, static_segments, segsize); data/ccrypt-1.11/intl/loadmsgcat.c:1197:6: [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 (mem, sysdep_segment_values[sysdepref], n); data/ccrypt-1.11/intl/localcharset.c:150:13: [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 (file_name, dir, dir_len); data/ccrypt-1.11/intl/localcharset.c:153:13: [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 (file_name + dir_len + add_slash, base, base_len + 1); data/ccrypt-1.11/intl/localcharset.c:171:16: [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). fd = open (file_name, data/ccrypt-1.11/intl/localcharset.c:196:23: [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 buf1[50+1]; data/ccrypt-1.11/intl/localcharset.c:197:23: [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[50+1]; data/ccrypt-1.11/intl/localcharset.c:412: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 buf[2 + 10 + 1]; data/ccrypt-1.11/intl/localcharset.c:438: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. memcpy (buf, dot, modifier - dot); data/ccrypt-1.11/intl/localcharset.c:456:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", GetACP ()); data/ccrypt-1.11/intl/localcharset.c:493: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 buf[2 + 10 + 1]; data/ccrypt-1.11/intl/localcharset.c:521:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", GetACP ()); data/ccrypt-1.11/intl/localcharset.c:528: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 buf[2 + 10 + 1]; data/ccrypt-1.11/intl/localcharset.c:559: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 (buf, dot, modifier - dot); data/ccrypt-1.11/intl/localcharset.c:577:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (buf, "CP%u", cp[0]); data/ccrypt-1.11/intl/localealias.c:230: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 (full_fname, fname, fname_len); data/ccrypt-1.11/intl/localealias.c:231: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 (&full_fname[fname_len], aliasfile, sizeof aliasfile); data/ccrypt-1.11/intl/localealias.c:237: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 (relocate (full_fname), "rce"); data/ccrypt-1.11/intl/localealias.c:239: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 (relocate (full_fname), "r"); data/ccrypt-1.11/intl/localealias.c:260:7: [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[400]; data/ccrypt-1.11/intl/localealias.c:353:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (const char *) memcpy (&string_space[string_space_act], data/ccrypt-1.11/intl/localealias.c:358:22: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (const char *) memcpy (&string_space[string_space_act], data/ccrypt-1.11/intl/localename.c:1165:26: [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. typedef struct { const char legacy[21+1]; const char unixy[5+1]; } data/ccrypt-1.11/intl/localename.c:1165:51: [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. typedef struct { const char legacy[21+1]; const char unixy[5+1]; } data/ccrypt-1.11/intl/localename.c:1303:26: [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. typedef struct { const char langtag[7+1]; const char unixy[12+1]; } data/ccrypt-1.11/intl/localename.c:1303:51: [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. typedef struct { const char langtag[7+1]; const char unixy[12+1]; } data/ccrypt-1.11/intl/localename.c:1333:26: [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. typedef struct { const char script[4+1]; const char unixy[9+1]; } data/ccrypt-1.11/intl/localename.c:1333:50: [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. typedef struct { const char script[4+1]; const char unixy[9+1]; } data/ccrypt-1.11/intl/localename.c:1466: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 namebuf[256]; data/ccrypt-1.11/intl/localename.c:2523:8: [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 lname[LC_MAX * (LOCALE_NAME_MAX_LENGTH + 1) + 1]; data/ccrypt-1.11/intl/localename.c:2530: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 locval[2 * LOCALE_NAME_MAX_LENGTH + 1 + 1]; data/ccrypt-1.11/intl/localename.c:2566: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 last_locale[1000]; data/ccrypt-1.11/intl/localename.c:2622: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 contents[100]; /* has variable size */ data/ccrypt-1.11/intl/localename.c:2653: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 (new_node->contents, string, size); data/ccrypt-1.11/intl/localename.c:2902:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[256]; data/ccrypt-1.11/intl/log.c:89:22: [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). last_logfile = fopen (logfilename, "a"); data/ccrypt-1.11/intl/os2compat.c:40: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 libintl_nl_default_dirname[MAXPATHLEN+1]; data/ccrypt-1.11/intl/os2compat.c:59: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 (_nlos2_libdir, root, sl); data/ccrypt-1.11/intl/os2compat.c:60: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 (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); data/ccrypt-1.11/intl/os2compat.c:73: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 (_nlos2_localealiaspath, root, sl); data/ccrypt-1.11/intl/os2compat.c:74: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 (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); data/ccrypt-1.11/intl/os2compat.c:87: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 (_nlos2_localedir, root, sl); data/ccrypt-1.11/intl/os2compat.c:88: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 (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); data/ccrypt-1.11/intl/plural.c:966: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/ccrypt-1.11/intl/plural.c:1158: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 yymsgbuf[128]; data/ccrypt-1.11/intl/printf-parse.c:123: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, a->arg, a->count * sizeof (argument)); \ data/ccrypt-1.11/intl/printf-parse.c:600:17: [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, d->dir, d->count * sizeof (DIRECTIVE)); data/ccrypt-1.11/intl/printf.c:225: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 (resultbuf, result, pruned_length); data/ccrypt-1.11/intl/printf.c:402: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 (resultbuf, result, pruned_length * sizeof (wchar_t)); data/ccrypt-1.11/intl/relocatable.c:142: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/ccrypt-1.11/intl/relocatable.c:145: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/ccrypt-1.11/intl/relocatable.c:227: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/ccrypt-1.11/intl/relocatable.c:296: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 (curr_prefix, curr_installdir, curr_prefix_len); data/ccrypt-1.11/intl/relocatable.c:330: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/ccrypt-1.11/intl/relocatable.c:356: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/ccrypt-1.11/intl/relocatable.c:399: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/ccrypt-1.11/intl/relocatable.c:534: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/ccrypt-1.11/intl/setlocale.c:640: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 llCC_buf[64]; data/ccrypt-1.11/intl/setlocale.c:641: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 ll_buf[64]; data/ccrypt-1.11/intl/setlocale.c:642: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 CC_buf[64]; data/ccrypt-1.11/intl/setlocale.c:711:13: [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 (ll_buf, llCC_buf, underscore - llCC_buf); data/ccrypt-1.11/intl/setlocale.c:714:13: [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 (CC_buf, territory_start, territory_end - territory_start); data/ccrypt-1.11/intl/setlocale.c:747:29: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64+64]; data/ccrypt-1.11/intl/setlocale.c:751:29: [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 (buf, part1, part1_len); data/ccrypt-1.11/intl/setlocale.c:753:29: [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 (buf + part1_len + 1, part2, part2_len); data/ccrypt-1.11/intl/setlocale.c:794:8: [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 lc_messages_name[64] = "C"; data/ccrypt-1.11/intl/textdomain.c:99:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (new_domain, domainname, len); data/ccrypt-1.11/intl/vasnprintf.c:143:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define DCHAR_CPY memcpy data/ccrypt-1.11/intl/vasnprintf.c:284: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 pointbuf[5]; data/ccrypt-1.11/intl/vasnprintf.c:285:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (pointbuf, "%#.0f", 1.0); data/ccrypt-1.11/intl/vasnprintf.c:509: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 (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); data/ccrypt-1.11/intl/vasnprintf.c:645: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 (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); data/ccrypt-1.11/intl/vasnprintf.c:2664:27: [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 cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/ccrypt-1.11/intl/vasnprintf.c:2709:27: [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 cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/ccrypt-1.11/intl/vasnprintf.c:2759:25: [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 cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/ccrypt-1.11/intl/vasnprintf.c:2772:25: [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 (tmpptr, cbuf, count); data/ccrypt-1.11/intl/vasnprintf.c:2840:27: [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 cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/ccrypt-1.11/intl/vasnprintf.c:2853:27: [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 + length, cbuf, count); data/ccrypt-1.11/intl/vasnprintf.c:2869:27: [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 cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ data/ccrypt-1.11/intl/vasnprintf.c:2891:27: [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 + length, cbuf, count); data/ccrypt-1.11/intl/vasnprintf.c:3172:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3178:35: [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 expbuf[6 + 1]; data/ccrypt-1.11/intl/vasnprintf.c:3180:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3323:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3329:35: [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 expbuf[6 + 1]; data/ccrypt-1.11/intl/vasnprintf.c:3331:35: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3398:17: [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 + length, tmp, count * sizeof (DCHAR_T)); data/ccrypt-1.11/intl/vasnprintf.c:3783:37: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+.2d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3789:37: [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 expbuf[6 + 1]; data/ccrypt-1.11/intl/vasnprintf.c:3791:37: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+.2d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3964:45: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+.2d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:3970:45: [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 expbuf[6 + 1]; data/ccrypt-1.11/intl/vasnprintf.c:3972:45: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+.2d", exponent); data/ccrypt-1.11/intl/vasnprintf.c:4262:39: [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 expbuf[6 + 1]; data/ccrypt-1.11/intl/vasnprintf.c:4455:47: [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 expbuf[6 + 1]; data/ccrypt-1.11/intl/vasnprintf.c:4581:17: [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 + length, tmp, count * sizeof (DCHAR_T)); data/ccrypt-1.11/intl/vasnprintf.c:4789:29: [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 (fbp, dp->width_start, n * sizeof (TCHAR_T)); data/ccrypt-1.11/intl/vasnprintf.c:4810:29: [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 (fbp, dp->precision_start, n * sizeof (TCHAR_T)); data/ccrypt-1.11/intl/vasnprintf.c:5509:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (result + length, tmp, count * sizeof (DCHAR_T)); data/ccrypt-1.11/src/ccguess.c:50:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static void hashstring(char *keystring, xword32 hash[8]) { data/ccrypt-1.11/src/ccguess.c:77: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(headercopy, header, 32); data/ccrypt-1.11/src/ccguess.c:149: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[len+2]; data/ccrypt-1.11/src/ccguess.c:172: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[len+1]; data/ccrypt-1.11/src/ccguess.c:194: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[len+1]; data/ccrypt-1.11/src/ccguess.c:217: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[len]; data/ccrypt-1.11/src/ccguess.c:292:44: [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. int tryall(pattern_t *plist, int wildcard, char *chartable, int ctsize, xword32 (*headers)[8], int n, int cont) { data/ccrypt-1.11/src/ccguess.c:384:13: [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. int ccguess(char *key, xword32 (*headers)[8], int n, char *chartable, int ctsize, int depth, int cont) { data/ccrypt-1.11/src/ccguess.c:598: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 bytes[256]; data/ccrypt-1.11/src/ccguess.c:654: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). fin = fopen(file, "r"); data/ccrypt-1.11/src/ccrypt.c:86:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const char *keylist[2]; data/ccrypt-1.11/src/ccrypt.c:113: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[MIDBUFSIZE]; data/ccrypt-1.11/src/ccrypt.c:261: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 inbuf[INBUFSIZE], outbuf[OUTBUFSIZE]; data/ccrypt-1.11/src/ccrypt.c:386: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 inbuf[32]; data/ccrypt-1.11/src/ccrypt.c:387: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 outbuf[32]; data/ccrypt-1.11/src/ccrypt.c:452: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 inbuf[FILEINBUFSIZE]; data/ccrypt-1.11/src/ccrypt.c:453: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 outbuf[FILEINBUFSIZE+32]; data/ccrypt-1.11/src/ccryptlib.c:56:30: [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 void hashstring(const char *keystring, xword32 hash[8]) { data/ccrypt-1.11/src/ccryptlib.c:78: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 acc[512], host[256]; data/ccrypt-1.11/src/ccryptlib.c:152:2: [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(lbuf, b->next_in, 32); data/ccrypt-1.11/src/ccryptlib.c:162:2: [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(b->next_out, st->buf, 32); data/ccrypt-1.11/src/ccryptlib.c:272:2: [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(lbuf, st->buf, 32); data/ccrypt-1.11/src/ccryptlib.c:275:2: [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(st->buf, b->next_in, 32); data/ccrypt-1.11/src/ccryptlib.c:285:2: [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(b->next_out, lbuf, 32); data/ccrypt-1.11/src/ccryptlib.c:307:4: [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(lbuf, st->buf, 32); data/ccrypt-1.11/src/gettext.h:218: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/ccrypt-1.11/src/gettext.h:220: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/ccrypt-1.11/src/gettext.h:229: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/ccrypt-1.11/src/gettext.h:231: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/ccrypt-1.11/src/gettext.h:266: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/ccrypt-1.11/src/gettext.h:268: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/ccrypt-1.11/src/gettext.h:277: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/ccrypt-1.11/src/gettext.h:279: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/ccrypt-1.11/src/main.c:461: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). f = fopen(cmd.keyfile, "r"); data/ccrypt-1.11/src/main.c:556:9: [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(cmd.keyref, "rb"); data/ccrypt-1.11/src/platform.c:15: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[MAX_COMPUTERNAME_LENGTH + 1]; data/ccrypt-1.11/src/platform.c:49:5: [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 mkstemp(char *template) { data/ccrypt-1.11/src/platform.c:66: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). fd = open(template, O_CREAT | O_EXCL | O_RDWR | O_BINARY, S_IRUSR | S_IWUSR); data/ccrypt-1.11/src/platform.h:52:5: [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 mkstemp(char *template); data/ccrypt-1.11/src/readkey.c:32:9: [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). fin = fopen("/dev/tty", "r"); data/ccrypt-1.11/src/traverse.c:151:9: [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). fin = fopen("/dev/tty", "r"); data/ccrypt-1.11/src/traverse.c:323: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). fd = open(infile, O_RDWR | O_BINARY); data/ccrypt-1.11/src/traverse.c:432:9: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char *tmpfile; data/ccrypt-1.11/src/traverse.c:483:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). strcpy(tmpfile, outfile); data/ccrypt-1.11/src/traverse.c:484:5: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(tmpfile, ".XXXXXX"); data/ccrypt-1.11/src/traverse.c:484:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). strcat(tmpfile, ".XXXXXX"); data/ccrypt-1.11/src/traverse.c:485:13: [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). fdout = mkstemp(tmpfile); data/ccrypt-1.11/src/traverse.c:485:21: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fdout = mkstemp(tmpfile); data/ccrypt-1.11/src/traverse.c:489:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). free(tmpfile); data/ccrypt-1.11/src/traverse.c:494:13: [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). fdout = open(tmpfile, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, S_IRUSR | S_IWUSR); data/ccrypt-1.11/src/traverse.c:494:18: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fdout = open(tmpfile, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, S_IRUSR | S_IWUSR); data/ccrypt-1.11/src/traverse.c:496:49: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fprintf(stderr, "%s: %s: %s\n", cmd.name, tmpfile, strerror(errno)); data/ccrypt-1.11/src/traverse.c:498:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). free(tmpfile); data/ccrypt-1.11/src/traverse.c:504:24: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). sigint_tmpfilename = tmpfile; data/ccrypt-1.11/src/traverse.c:510:9: [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). fin = fopen(infile, "rb"); data/ccrypt-1.11/src/traverse.c:520:47: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fprintf(stderr, "%s: %s: %s\n", cmd.name, tmpfile, strerror(errno)); data/ccrypt-1.11/src/traverse.c:568:11: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). utime(tmpfile, &ut); data/ccrypt-1.11/src/traverse.c:580:12: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(tmpfile); data/ccrypt-1.11/src/traverse.c:592:14: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). if (strcmp(tmpfile, outfile) != 0) { data/ccrypt-1.11/src/traverse.c:593:16: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). r = rename(tmpfile, outfile); data/ccrypt-1.11/src/traverse.c:595:75: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fprintf(stderr, _("%s: could not rename %s to %s: %s\n"), cmd.name, tmpfile, outfile, strerror(errno)); data/ccrypt-1.11/src/traverse.c:599:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). free(tmpfile); data/ccrypt-1.11/src/traverse.c:615:10: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). unlink(tmpfile); data/ccrypt-1.11/src/traverse.c:616:8: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). free(tmpfile); data/ccrypt-1.11/src/traverse.c:631:9: [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). fin = fopen(infile, "rb"); data/ccrypt-1.11/src/unixcrypt3.c:46: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 keysched[16 * 8]; data/ccrypt-1.11/src/unixcrypt3.c:47: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 sb0[32768]; data/ccrypt-1.11/src/unixcrypt3.c:48: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 sb1[32768]; data/ccrypt-1.11/src/unixcrypt3.c:49: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 sb2[32768]; data/ccrypt-1.11/src/unixcrypt3.c:50: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 sb3[32768]; data/ccrypt-1.11/src/unixcrypt3.c:52: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 crypt_3_buf[14]; data/ccrypt-1.11/src/unixcrypt3.c:53: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 current_salt[2]; data/ccrypt-1.11/src/unixcrypt3.c:182:23: [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 const unsigned char bytemask[8] = { data/ccrypt-1.11/src/unixcrypt3.c:630: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 ktab[9]; data/ccrypt-1.11/src/unixcryptlib.c:44: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 salt1[3]; data/ccrypt-1.11/src/unixcryptlib.c:45: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 result[13]; data/ccrypt-1.11/src/unixcryptlib.c: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 box1[0x100]; data/ccrypt-1.11/src/unixcryptlib.c:70: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 box2[0x100]; data/ccrypt-1.11/src/unixcryptlib.c:71: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 box3[0x100]; data/ccrypt-1.11/src/unixcryptlib.c:80: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. signed char buf[16]; data/ccrypt-1.11/check/crypt3-check.c:72:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res1, p, 13); data/ccrypt-1.11/check/crypt3-check.c:74:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(res2, p, 13); data/ccrypt-1.11/intl/bindtextdom.c:133: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 len = strlen (dirname) + 1; data/ccrypt-1.11/intl/bindtextdom.c:171: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 = strlen (codeset) + 1; data/ccrypt-1.11/intl/bindtextdom.c:201: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). size_t len = strlen (domainname) + 1; data/ccrypt-1.11/intl/bindtextdom.c:229: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 = strlen (dirname) + 1; data/ccrypt-1.11/intl/bindtextdom.c:258: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 len = strlen (codeset) + 1; data/ccrypt-1.11/intl/bindtextdom.c:328: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). size_t len = strlen (dirname) + 1; data/ccrypt-1.11/intl/dcigettext.c:626: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 dirname_len = strlen (dirname) + 1; data/ccrypt-1.11/intl/dcigettext.c:670: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). domainname_len = strlen (domainname); data/ccrypt-1.11/intl/dcigettext.c:671: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). xdomainname = (char *) alloca (strlen (categoryname) data/ccrypt-1.11/intl/dcigettext.c:680: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). single_locale = (char *) alloca (strlen (categoryvalue) + 1); data/ccrypt-1.11/intl/dcigettext.c:777: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). msgid_len = strlen (msgid1) + 1; data/ccrypt-1.11/intl/dcigettext.c:781: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). size += strlen (localename) + 1; data/ccrypt-1.11/intl/dcigettext.c:917: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). nls_uint32 len = strlen (msgid); data/ccrypt-1.11/intl/dcigettext.c:1127: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). charsetstr += strlen ("charset="); data/ccrypt-1.11/intl/dcigettext.c:1171: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). len = strlen (outcharset); data/ccrypt-1.11/intl/dcigettext.c:1631: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 len = strlen (value) + 1; data/ccrypt-1.11/intl/eval-plural.h:86:13: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. case equal: data/ccrypt-1.11/intl/finddomain.c:92: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 (dirname) + 1, 0, locale, NULL, NULL, data/ccrypt-1.11/intl/finddomain.c:132: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). size_t len = strlen (alias_value) + 1; data/ccrypt-1.11/intl/finddomain.c:155: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 (dirname) + 1, mask, language, territory, data/ccrypt-1.11/intl/l10nflist.c:94: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 part_len = strlen (argz); data/ccrypt-1.11/intl/l10nflist.c:116: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 part_len = strlen (argz); data/ccrypt-1.11/intl/l10nflist.c:191: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). + strlen (language) data/ccrypt-1.11/intl/l10nflist.c:193: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). ? strlen (territory) + 1 : 0) data/ccrypt-1.11/intl/l10nflist.c:195: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). ? strlen (codeset) + 1 : 0) data/ccrypt-1.11/intl/l10nflist.c:197: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). ? strlen (normalized_codeset) + 1 : 0) data/ccrypt-1.11/intl/l10nflist.c:199: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). ? strlen (modifier) + 1 : 0) data/ccrypt-1.11/intl/l10nflist.c:200: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). + 1 + strlen (filename) + 1); data/ccrypt-1.11/intl/l10nflist.c:320:45: [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). = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, data/ccrypt-1.11/intl/langprefs.c:127: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). q = q2 + strlen (q2); data/ccrypt-1.11/intl/langprefs.c:266: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 += strlen (buf) + 1; data/ccrypt-1.11/intl/langprefs.c:298: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). p += strlen (buf); data/ccrypt-1.11/intl/loadmsgcat.c:473:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define read(fd, buf, n) read_not_cancel (fd, buf, n) data/ccrypt-1.11/intl/loadmsgcat.c:881:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long int nb = (long int) read (fd, read_ptr, to_read); data/ccrypt-1.11/intl/loadmsgcat.c:1061: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). need += strlen (sysdep_segment_values[sysdepref]); data/ccrypt-1.11/intl/loadmsgcat.c:1196: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). n = strlen (sysdep_segment_values[sysdepref]); data/ccrypt-1.11/intl/localcharset.c:104:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/ccrypt-1.11/intl/localcharset.c:105:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc getc_unlocked data/ccrypt-1.11/intl/localcharset.c:144: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 dir_len = strlen (dir); data/ccrypt-1.11/intl/localcharset.c:145: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). size_t base_len = strlen (base); data/ccrypt-1.11/intl/localcharset.c:201:27: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/ccrypt-1.11/intl/localcharset.c:210:33: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/ccrypt-1.11/intl/localcharset.c:217:27: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) data/ccrypt-1.11/intl/localcharset.c:219: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). l1 = strlen (buf1); data/ccrypt-1.11/intl/localcharset.c:220: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). l2 = strlen (buf2); data/ccrypt-1.11/intl/localcharset.c:591: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). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/ccrypt-1.11/intl/localcharset.c:591: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). aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) data/ccrypt-1.11/intl/localcharset.c:595: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). codeset = aliases + strlen (aliases) + 1; data/ccrypt-1.11/intl/localealias.c:324: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). alias_len = strlen (alias) + 1; data/ccrypt-1.11/intl/localealias.c:325: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). value_len = strlen (value) + 1; data/ccrypt-1.11/intl/localename.c:1366: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 (name) == 7 && name[2] == '-') data/ccrypt-1.11/intl/localename.c:2536:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (locval, "_"); data/ccrypt-1.11/intl/localename.c:2538: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). locval + strlen (locval), LOCALE_NAME_MAX_LENGTH)) data/ccrypt-1.11/intl/localename.c:2540: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). size_t locval_len = strlen (locval); data/ccrypt-1.11/intl/localename.c:2576:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (lname, locale_name, sizeof (lname) - 1); data/ccrypt-1.11/intl/localename.c:2646: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). size = strlen (string) + 1; data/ccrypt-1.11/intl/log.c:85: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). last_logfilename = (char *) malloc (strlen (logfilename) + 1); data/ccrypt-1.11/intl/log.c:96: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). print_escaped (logfile, domainname, domainname + strlen (domainname)); data/ccrypt-1.11/intl/log.c:106: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). print_escaped (logfile, msgid1, msgid1 + strlen (msgid1)); data/ccrypt-1.11/intl/log.c:110: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). print_escaped (logfile, msgid2, msgid2 + strlen (msgid2)); data/ccrypt-1.11/intl/os2compat.c:57: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 sl = strlen (root); data/ccrypt-1.11/intl/os2compat.c:58: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). _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1); data/ccrypt-1.11/intl/os2compat.c:60: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). memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1); data/ccrypt-1.11/intl/os2compat.c:71: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 sl = strlen (root); data/ccrypt-1.11/intl/os2compat.c:72:58: [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). _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1); data/ccrypt-1.11/intl/os2compat.c:74:67: [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). memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1); data/ccrypt-1.11/intl/os2compat.c:85: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 sl = strlen (root); data/ccrypt-1.11/intl/os2compat.c:86: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). _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1); data/ccrypt-1.11/intl/os2compat.c:88: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). memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1); data/ccrypt-1.11/intl/os2compat.c:94: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 (_nlos2_localedir) <= MAXPATHLEN) data/ccrypt-1.11/intl/plural-exp.h:51:3: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. equal, /* Comparison for equality. */ data/ccrypt-1.11/intl/plural.c:866: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). # define yystrlen strlen data/ccrypt-1.11/intl/plural.c:1757:15: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. lval->op = equal; data/ccrypt-1.11/intl/relocatable.c:135: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/ccrypt-1.11/intl/relocatable.c:136: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/ccrypt-1.11/intl/relocatable.c:203: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/ccrypt-1.11/intl/relocatable.c:207: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/ccrypt-1.11/intl/relocatable.c:212: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/ccrypt-1.11/intl/relocatable.c:235: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/ccrypt-1.11/intl/relocatable.c:236: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/ccrypt-1.11/intl/relocatable.c:413: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/ccrypt-1.11/intl/relocatable.c:432: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/ccrypt-1.11/intl/relocatable.c:513: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/ccrypt-1.11/intl/relocatable.c:528: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/ccrypt-1.11/intl/relocatable.c:548: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/ccrypt-1.11/intl/setlocale.c:652: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 (locale) < sizeof (llCC_buf)) data/ccrypt-1.11/intl/setlocale.c:709: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). territory_end = territory_start + strlen (territory_start); data/ccrypt-1.11/intl/setlocale.c:744: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). size_t part1_len = strlen (part1); data/ccrypt-1.11/intl/setlocale.c:746: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). size_t part2_len = strlen (part2) + 1; data/ccrypt-1.11/intl/setlocale.c:805:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1); data/ccrypt-1.11/intl/textdomain.c:96: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). size_t len = strlen (domainname) + 1; data/ccrypt-1.11/intl/vasnprintf.c:229:24: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). # define local_wcslen wcslen data/ccrypt-1.11/intl/vasnprintf.c:1731: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). tmp_length = strlen (arg); data/ccrypt-1.11/intl/vasnprintf.c:2563: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). arg_end = arg + strlen (arg); data/ccrypt-1.11/intl/vasnprintf.c:3650: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). ndigits = strlen (digits); data/ccrypt-1.11/intl/vasnprintf.c:3710:51: [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). ndigits = strlen (digits); data/ccrypt-1.11/intl/vasnprintf.c:3746:45: [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 (digits2) == precision + 1) data/ccrypt-1.11/intl/vasnprintf.c:3846:51: [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). ndigits = strlen (digits); data/ccrypt-1.11/intl/vasnprintf.c:3882:45: [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 (digits2) == precision) data/ccrypt-1.11/intl/vasnprintf.c:4112: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). ndigits = strlen (digits); data/ccrypt-1.11/intl/vasnprintf.c:4169:51: [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). ndigits = strlen (digits); data/ccrypt-1.11/intl/vasnprintf.c:4204:45: [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 (digits2) == precision + 1) data/ccrypt-1.11/intl/vasnprintf.c:4317:51: [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). ndigits = strlen (digits); data/ccrypt-1.11/intl/vasnprintf.c:4352:45: [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 (digits2) == precision) data/ccrypt-1.11/src/ccguess.c:110: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). pat->l = strlen(s); data/ccrypt-1.11/src/ccguess.c:154:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s, i); data/ccrypt-1.11/src/ccguess.c:222:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, s, i); data/ccrypt-1.11/src/ccrypt.c:87:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(key); data/ccrypt-1.11/src/ccrypt.c:341:11: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (cmd.mismatch) { data/ccrypt-1.11/src/ccrypt.c:478:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r = read(fd, inbuf+i, FILEINBUFSIZE-i); data/ccrypt-1.11/src/ccryptlib.c:122:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)st->buf, MAGIC, 4); data/ccrypt-1.11/src/getopt.c:234:51: [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 (!defined __STDC__ || !__STDC__) && !defined strlen data/ccrypt-1.11/src/getopt.c:237: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). extern int strlen (const char *); data/ccrypt-1.11/src/getopt.c:435: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). int len = nonoption_flags_max_len = strlen (orig_str); data/ccrypt-1.11/src/getopt.c:663: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). == (unsigned int) strlen (p->name)) data/ccrypt-1.11/src/getopt.c:690: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:722: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:738: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:743: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:854:51: [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 ((unsigned int) (nameend - nextchar) == strlen (p->name)) data/ccrypt-1.11/src/getopt.c:877: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:897: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:911: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/getopt.c:915: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). nextchar += strlen (nextchar); data/ccrypt-1.11/src/gettext.h:214: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/ccrypt-1.11/src/gettext.h:215: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/ccrypt-1.11/src/gettext.h:262: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/ccrypt-1.11/src/gettext.h:263: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/ccrypt-1.11/src/main.c:139:40: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. fprintf(fout, "mismatch = %s\n", cmd.mismatch ? "yes" : "no"); data/ccrypt-1.11/src/main.c:394:11: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (cmd.mismatch && !cmd.filter && cmd.mode!=CAT && cmd.mode!=UNIXCRYPT) { data/ccrypt-1.11/src/main.h:33:7: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. int mismatch; /* allow decryption with non-matching key? */ data/ccrypt-1.11/src/platform.c:23:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, buf, len-1); data/ccrypt-1.11/src/platform.c:50:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(template); data/ccrypt-1.11/src/traverse.c:102: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 flen = strlen(filename); data/ccrypt-1.11/src/traverse.c:103: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 slen = strlen(suffix); data/ccrypt-1.11/src/traverse.c:111: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 flen = strlen(filename); data/ccrypt-1.11/src/traverse.c:112: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 slen = strlen(suffix); data/ccrypt-1.11/src/traverse.c:118:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (outfile, filename, flen); data/ccrypt-1.11/src/traverse.c:119:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (outfile+flen, suffix, slen+1); data/ccrypt-1.11/src/traverse.c:127: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 flen = strlen(filename); data/ccrypt-1.11/src/traverse.c:128: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 slen = strlen(suffix); data/ccrypt-1.11/src/traverse.c:137:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (outfile, filename, flen-slen); data/ccrypt-1.11/src/traverse.c:199: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). char *strbuf = (char *)xalloc(strlen(dirname)+strlen(dirent->d_name)+2, cmd.name); data/ccrypt-1.11/src/traverse.c:199: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). char *strbuf = (char *)xalloc(strlen(dirname)+strlen(dirent->d_name)+2, cmd.name); data/ccrypt-1.11/src/traverse.c:201:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat (strbuf, "/"); data/ccrypt-1.11/src/traverse.c:482: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). tmpfile = (char *)xalloc(strlen(outfile)+8, cmd.name); data/ccrypt-1.11/src/traverse.c:755: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). buffer = (char *)xalloc(strlen(filename)+strlen(cmd.suffix)+1, cmd.name); data/ccrypt-1.11/src/traverse.c:755: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). buffer = (char *)xalloc(strlen(filename)+strlen(cmd.suffix)+1, cmd.name); data/ccrypt-1.11/src/unixcrypt3.c:642:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). (void) strncpy (ktab, key, 8); data/ccrypt-1.11/src/unixcryptlib.c:59:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(result, p, 13); data/ccrypt-1.11/src/unixcryptlib.c:92:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)buf, key, 8); data/ccrypt-1.11/src/unixcryptlib.c:101:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)buf, p, 13); ANALYSIS SUMMARY: Hits = 521 Lines analyzed = 34001 in approximately 1.00 seconds (34160 lines/second) Physical Source Lines of Code (SLOC) = 24343 Hits@level = [0] 221 [1] 154 [2] 206 [3] 55 [4] 105 [5] 1 Hits@level+ = [0+] 742 [1+] 521 [2+] 367 [3+] 161 [4+] 106 [5+] 1 Hits/KSLOC@level+ = [0+] 30.481 [1+] 21.4025 [2+] 15.0762 [3+] 6.61381 [4+] 4.35443 [5+] 0.0410796 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.