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/gftp-2.0.19/src/uicommon/gftpui.c Examining data/gftp-2.0.19/src/uicommon/gftpuicallbacks.c Examining data/gftp-2.0.19/src/uicommon/gftpui.h Examining data/gftp-2.0.19/src/gtk/options_dialog.c Examining data/gftp-2.0.19/src/gtk/misc-gtk.c Examining data/gftp-2.0.19/src/gtk/transfer.c Examining data/gftp-2.0.19/src/gtk/dnd.c Examining data/gftp-2.0.19/src/gtk/menu-items.c Examining data/gftp-2.0.19/src/gtk/gtkui.c Examining data/gftp-2.0.19/src/gtk/view_dialog.c Examining data/gftp-2.0.19/src/gtk/chmod_dialog.c Examining data/gftp-2.0.19/src/gtk/delete_dialog.c Examining data/gftp-2.0.19/src/gtk/bookmarks.c Examining data/gftp-2.0.19/src/gtk/gtkui_transfer.c Examining data/gftp-2.0.19/src/gtk/gftp-gtk.c Examining data/gftp-2.0.19/src/gtk/gftp-gtk.h Examining data/gftp-2.0.19/src/text/textui.c Examining data/gftp-2.0.19/src/text/gftp-text.h Examining data/gftp-2.0.19/src/text/gftp-text.c Examining data/gftp-2.0.19/lib/sslcommon.c Examining data/gftp-2.0.19/lib/socket-connect-getaddrinfo.c Examining data/gftp-2.0.19/lib/sshv2.c Examining data/gftp-2.0.19/lib/rfc959.c Examining data/gftp-2.0.19/lib/fsp.c Examining data/gftp-2.0.19/lib/misc.c Examining data/gftp-2.0.19/lib/ftpcommon.h Examining data/gftp-2.0.19/lib/charset-conv.c Examining data/gftp-2.0.19/lib/mkstemps.c Examining data/gftp-2.0.19/lib/bookmark.c Examining data/gftp-2.0.19/lib/fsplib/lock.c Examining data/gftp-2.0.19/lib/fsplib/fsplib.c Examining data/gftp-2.0.19/lib/fsplib/fsplib.h Examining data/gftp-2.0.19/lib/fsplib/lock.h Examining data/gftp-2.0.19/lib/config_file.c Examining data/gftp-2.0.19/lib/options.h Examining data/gftp-2.0.19/lib/ftps.c Examining data/gftp-2.0.19/lib/httpcommon.h Examining data/gftp-2.0.19/lib/cache.c Examining data/gftp-2.0.19/lib/socket-connect.c Examining data/gftp-2.0.19/lib/parse-dir-listing.c Examining data/gftp-2.0.19/lib/socket-connect-gethostbyname.c Examining data/gftp-2.0.19/lib/rfc2068.c Examining data/gftp-2.0.19/lib/protocols.c Examining data/gftp-2.0.19/lib/https.c Examining data/gftp-2.0.19/lib/sockutils.c Examining data/gftp-2.0.19/lib/local.c Examining data/gftp-2.0.19/lib/gftp.h Examining data/gftp-2.0.19/lib/pty.c Examining data/gftp-2.0.19/intl/bindtextdom.c Examining data/gftp-2.0.19/intl/version.c Examining data/gftp-2.0.19/intl/os2compat.h Examining data/gftp-2.0.19/intl/loadinfo.h Examining data/gftp-2.0.19/intl/intl-compat.c Examining data/gftp-2.0.19/intl/l10nflist.c Examining data/gftp-2.0.19/intl/plural-exp.h Examining data/gftp-2.0.19/intl/dcigettext.c Examining data/gftp-2.0.19/intl/xsize.h Examining data/gftp-2.0.19/intl/tsearch.c Examining data/gftp-2.0.19/intl/dngettext.c Examining data/gftp-2.0.19/intl/localealias.c Examining data/gftp-2.0.19/intl/textdomain.c Examining data/gftp-2.0.19/intl/gettextP.h Examining data/gftp-2.0.19/intl/dcgettext.c Examining data/gftp-2.0.19/intl/hash-string.c Examining data/gftp-2.0.19/intl/lock.c Examining data/gftp-2.0.19/intl/gettext.c Examining data/gftp-2.0.19/intl/printf.c Examining data/gftp-2.0.19/intl/hash-string.h Examining data/gftp-2.0.19/intl/localename.c Examining data/gftp-2.0.19/intl/wprintf-parse.h Examining data/gftp-2.0.19/intl/printf-args.c Examining data/gftp-2.0.19/intl/osdep.c Examining data/gftp-2.0.19/intl/plural.c Examining data/gftp-2.0.19/intl/finddomain.c Examining data/gftp-2.0.19/intl/printf-parse.h Examining data/gftp-2.0.19/intl/localcharset.h Examining data/gftp-2.0.19/intl/dgettext.c Examining data/gftp-2.0.19/intl/os2compat.c Examining data/gftp-2.0.19/intl/explodename.c Examining data/gftp-2.0.19/intl/vasnprintf.c Examining data/gftp-2.0.19/intl/printf-args.h Examining data/gftp-2.0.19/intl/vasnprintf.h Examining data/gftp-2.0.19/intl/ngettext.c Examining data/gftp-2.0.19/intl/eval-plural.h Examining data/gftp-2.0.19/intl/export.h Examining data/gftp-2.0.19/intl/log.c Examining data/gftp-2.0.19/intl/dcngettext.c Examining data/gftp-2.0.19/intl/vasnwprintf.h Examining data/gftp-2.0.19/intl/printf-parse.c Examining data/gftp-2.0.19/intl/intl-exports.c Examining data/gftp-2.0.19/intl/langprefs.c Examining data/gftp-2.0.19/intl/gmo.h Examining data/gftp-2.0.19/intl/lock.h Examining data/gftp-2.0.19/intl/tsearch.h Examining data/gftp-2.0.19/intl/loadmsgcat.c Examining data/gftp-2.0.19/intl/relocatable.c Examining data/gftp-2.0.19/intl/plural-exp.c Examining data/gftp-2.0.19/intl/relocatable.h Examining data/gftp-2.0.19/intl/localcharset.c FINAL RESULTS: data/gftp-2.0.19/lib/gftp.h:477:9: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. int (*chmod) ( gftp_request * request, data/gftp-2.0.19/lib/local.c:638:13: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. ret = chmod (utf8, mode); data/gftp-2.0.19/lib/local.c:642:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. ret = chmod (file, mode); data/gftp-2.0.19/lib/protocols.c:883:20: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. return (request->chmod (request, file, mode)); data/gftp-2.0.19/lib/pty.c:209:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod (pts_name, S_IRUSR | S_IWUSR); data/gftp-2.0.19/lib/pty.c:210:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. chown (pts_name, getuid (), -1); data/gftp-2.0.19/src/gtk/chmod_dialog.c:132:107: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. if (!check_status (_("Chmod"), wdata, gftpui_common_use_threads (wdata->request), 0, 1, wdata->request->chmod != NULL)) data/gftp-2.0.19/src/gtk/menu-items.c:304:3: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod (tempstr, S_IRUSR | S_IWUSR); data/gftp-2.0.19/src/gtk/misc-gtk.c:353:39: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. wdata->request->chmod != NULL); data/gftp-2.0.19/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/gftp-2.0.19/intl/langprefs.c:107:8: [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/gftp-2.0.19/intl/localcharset.c:197:8: [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/gftp-2.0.19/intl/localcharset.c:198:8: [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/gftp-2.0.19/intl/localename.c:918:4: [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/gftp-2.0.19/intl/localename.c:942:4: [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/gftp-2.0.19/intl/localename.c:962:4: [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/gftp-2.0.19/intl/log.c:86: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/gftp-2.0.19/intl/os2compat.c:97: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/gftp-2.0.19/intl/plural.c:752: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/gftp-2.0.19/intl/printf.c:98: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/gftp-2.0.19/intl/printf.c:158:12: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. return vsprintf (resultbuf, format, args); data/gftp-2.0.19/intl/printf.c:198: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/gftp-2.0.19/intl/printf.c:309:28: [4] (buffer) vswprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define system_vswprintf vswprintf data/gftp-2.0.19/intl/printf.c:317: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/gftp-2.0.19/intl/relocatable.c:459:8: [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/gftp-2.0.19/intl/vasnprintf.c:182:20: [4] (buffer) swprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. # define SNPRINTF swprintf data/gftp-2.0.19/intl/vasnprintf.c:196: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/gftp-2.0.19/intl/vasnprintf.c:199: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/gftp-2.0.19/intl/vasnprintf.c:201: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/gftp-2.0.19/intl/vasnprintf.c:205:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. #undef sprintf data/gftp-2.0.19/intl/vasnprintf.c:3255:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ((char *) p, decimal_format, exponent); data/gftp-2.0.19/intl/vasnprintf.c:3263:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (expbuf, decimal_format, exponent); data/gftp-2.0.19/intl/vasnprintf.c:3425:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf ((char *) p, decimal_format, exponent); data/gftp-2.0.19/intl/vasnprintf.c:3433:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (expbuf, decimal_format, exponent); data/gftp-2.0.19/intl/vasnprintf.c:4095:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, arg); \ data/gftp-2.0.19/intl/vasnprintf.c:4098:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], arg); \ data/gftp-2.0.19/intl/vasnprintf.c:4101:12: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ data/gftp-2.0.19/intl/vasnprintf.h:37: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/gftp-2.0.19/lib/cache.c:132:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (cachedir, F_OK) == -1) data/gftp-2.0.19/lib/config_file.c:187:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tempstr, F_OK) == -1) data/gftp-2.0.19/lib/config_file.c:190:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (temp1str, F_OK) == -1) data/gftp-2.0.19/lib/config_file.c:369: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 (*dest, curpos); data/gftp-2.0.19/lib/config_file.c:591:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tempstr, F_OK) == -1) data/gftp-2.0.19/lib/config_file.c:594:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (temp1str, F_OK) == -1) data/gftp-2.0.19/lib/config_file.c:606:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (temp1str, F_OK) == -1) data/gftp-2.0.19/lib/fsplib/lock.c:18: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(lock->key_string,FSP_KEY_PREFIX); data/gftp-2.0.19/lib/gftp.h:118:45: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #warning major macro was not defined by the system. Defining one that is probably wrong for your system data/gftp-2.0.19/lib/gftp.h:118:98: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #warning major macro was not defined by the system. Defining one that is probably wrong for your system data/gftp-2.0.19/lib/gftp.h:123:45: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #warning minor macro was not defined by the system. Defining one that is probably wrong for your system data/gftp-2.0.19/lib/gftp.h:123:98: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. #warning minor macro was not defined by the system. Defining one that is probably wrong for your system data/gftp-2.0.19/lib/gftp.h:154:61: [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 GFTP_LOG_FUNCTION_ATTRIBUTES __attribute__((format(printf, 3, 4))) data/gftp-2.0.19/lib/parse-dir-listing.c:41: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 (*dest, source); data/gftp-2.0.19/lib/pty.c:336:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp (args[0], args); data/gftp-2.0.19/lib/rfc2068.c:148:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf (tempstr, GFTP_OFF_T_HEX_PRINTF_MOD, ¶ms->chunk_size) != 1) data/gftp-2.0.19/lib/rfc2068.c:836:11: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf (stpos + 2, GFTP_OFF_T_HEX_PRINTF_MOD, data/gftp-2.0.19/lib/rfc959.c:317:11: [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 (newstr, startpos); data/gftp-2.0.19/lib/rfc959.c:337:11: [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 (newstr, startpos); data/gftp-2.0.19/lib/rfc959.c:348:11: [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 (newstr, startpos); data/gftp-2.0.19/lib/rfc959.c:352:15: [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 (newstr, utf8); data/gftp-2.0.19/lib/rfc959.c:356:13: [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 (newstr, newval); data/gftp-2.0.19/lib/rfc959.c:1401:3: [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 (parms, show_hidden_files ? "a" : ""); data/gftp-2.0.19/lib/rfc959.c:1402:3: [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 (parms, resolve_symlinks ? "L" : ""); data/gftp-2.0.19/lib/socket-connect-getaddrinfo.c:72: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 (serv, service); data/gftp-2.0.19/lib/sshv2.c:286:3: [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 (*logstr, tempstr); data/gftp-2.0.19/src/gtk/dnd.c:215: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 (str + oldlen + 1, tempstr); data/gftp-2.0.19/src/gtk/dnd.c:220: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 (str, tempstr); data/gftp-2.0.19/src/gtk/menu-items.c:496: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 (tempstr, str); data/gftp-2.0.19/src/gtk/menu-items.c:574:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tempstr, F_OK) != 0) data/gftp-2.0.19/src/gtk/menu-items.c:580:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tempstr, F_OK) != 0) data/gftp-2.0.19/src/gtk/menu-items.c:584:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (tempstr, F_OK) != 0) data/gftp-2.0.19/src/gtk/misc-gtk.c:1252:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (exfile, F_OK) != 0) data/gftp-2.0.19/src/gtk/misc-gtk.c:1260:11: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (exfile, F_OK) != 0) data/gftp-2.0.19/src/gtk/misc-gtk.c:1264:8: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (access (exfile, F_OK) != 0) data/gftp-2.0.19/src/gtk/options_dialog.c:293: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 (ret, stpos); data/gftp-2.0.19/src/gtk/options_dialog.c:303: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 (ret, stpos); data/gftp-2.0.19/src/gtk/options_dialog.c:328: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 (ret, stpos); data/gftp-2.0.19/src/gtk/options_dialog.c:338: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 (ret, stpos); data/gftp-2.0.19/src/gtk/view_dialog.c:171:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp (argv[0], argv); data/gftp-2.0.19/intl/dcigettext.c:149: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/gftp-2.0.19/intl/dcigettext.c:150: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/gftp-2.0.19/intl/dcigettext.c:858: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/gftp-2.0.19/intl/dcigettext.c:1557: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/gftp-2.0.19/intl/dcigettext.c:1597: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/gftp-2.0.19/intl/localcharset.c:122: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/gftp-2.0.19/intl/localcharset.c:309: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/gftp-2.0.19/intl/localcharset.c:312: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. locale = getenv ("LC_CTYPE"); data/gftp-2.0.19/intl/localcharset.c:314:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/gftp-2.0.19/intl/localcharset.c:360: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/gftp-2.0.19/intl/localcharset.c:363: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. locale = getenv ("LC_CTYPE"); data/gftp-2.0.19/intl/localcharset.c:365:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv ("LANG"); data/gftp-2.0.19/intl/localcharset.c:393: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/gftp-2.0.19/intl/localcharset.c:396: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/gftp-2.0.19/intl/localcharset.c:398: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. locale = getenv ("LANG"); data/gftp-2.0.19/intl/localename.c:1005: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/gftp-2.0.19/intl/localename.c:1009: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/gftp-2.0.19/intl/localename.c:1013: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/gftp-2.0.19/intl/lock.c:525:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:543:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:654:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:675:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:705:8: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:728:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:757:8: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:771:3: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:828:3: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:850:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&lock->lock); data/gftp-2.0.19/intl/lock.c:891:4: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection (&once_control->lock); data/gftp-2.0.19/intl/lock.c:892:4: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&once_control->lock); data/gftp-2.0.19/intl/lock.c:911:8: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection (&once_control->lock); data/gftp-2.0.19/intl/os2compat.c:51: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/gftp-2.0.19/intl/os2compat.c:52: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/gftp-2.0.19/intl/os2compat.h:43: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/gftp-2.0.19/lib/fsplib/fsplib.c:247:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. retry = random() & 0xfff8; data/gftp-2.0.19/lib/fsplib/fsplib.c:477:12: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. s->seq=random() & 0xfff8; data/gftp-2.0.19/lib/misc.c:1288: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. envval = getenv ("GFTP_SHARE_DIR"); data/gftp-2.0.19/src/gtk/menu-items.c:295:26: [3] (buffer) g_get_tmp_dir: This function is synonymous with 'getenv("TMP")';it returns untrustable input if the environment can beset by an attacker. It 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. tempstr = g_strconcat (g_get_tmp_dir (), "/gftp-view.XXXXXXXXXX", NULL); data/gftp-2.0.19/src/gtk/view_dialog.c:67:44: [3] (buffer) g_get_tmp_dir: This function is synonymous with 'getenv("TMP")';it returns untrustable input if the environment can beset by an attacker. It 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. new_fle->destfile = g_strconcat (g_get_tmp_dir (), data/gftp-2.0.19/src/gtk/view_dialog.c:73:37: [3] (buffer) g_get_tmp_dir: This function is synonymous with 'getenv("TMP")';it returns untrustable input if the environment can beset by an attacker. It 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. new_fle->destfile = g_strconcat (g_get_tmp_dir (), data/gftp-2.0.19/intl/bindtextdom.c:138: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/gftp-2.0.19/intl/bindtextdom.c:176: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/gftp-2.0.19/intl/bindtextdom.c:211: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/gftp-2.0.19/intl/bindtextdom.c:236: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/gftp-2.0.19/intl/bindtextdom.c:265: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/gftp-2.0.19/intl/dcigettext.c:272: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 msgid[ZERO]; data/gftp-2.0.19/intl/dcigettext.c:421: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/gftp-2.0.19/intl/dcigettext.c:548: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 (search->msgid, msgid1, msgid_len); data/gftp-2.0.19/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/gftp-2.0.19/intl/dcigettext.c:1122: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/gftp-2.0.19/intl/dcigettext.c:1160: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/gftp-2.0.19/intl/dcigettext.c:1161: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/gftp-2.0.19/intl/dcigettext.c:1605: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/gftp-2.0.19/intl/dcigettext.c:1647: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/gftp-2.0.19/intl/finddomain.c:139: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/gftp-2.0.19/intl/gettextP.h: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 domainname[ZERO]; data/gftp-2.0.19/intl/l10nflist.c:215: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/gftp-2.0.19/intl/langprefs.c:62:6: [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/gftp-2.0.19/intl/loadmsgcat.c:468: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/gftp-2.0.19/intl/loadmsgcat.c:828: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/gftp-2.0.19/intl/loadmsgcat.c:1180: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/gftp-2.0.19/intl/loadmsgcat.c:1189: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/gftp-2.0.19/intl/localcharset.c:134: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 (file_name, dir, dir_len); data/gftp-2.0.19/intl/localcharset.c:137: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 (file_name + dir_len + add_slash, base, base_len + 1); data/gftp-2.0.19/intl/localcharset.c:141:38: [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). if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL) data/gftp-2.0.19/intl/localcharset.c:153: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. char buf1[50+1]; data/gftp-2.0.19/intl/localcharset.c:154: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. char buf2[50+1]; data/gftp-2.0.19/intl/localcharset.c:307: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/gftp-2.0.19/intl/localcharset.c:333: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 (buf, dot, modifier - dot); data/gftp-2.0.19/intl/localcharset.c:341: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/gftp-2.0.19/intl/localcharset.c:378: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/gftp-2.0.19/intl/localcharset.c:381: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 (buf, "CP%u", GetACP ()); data/gftp-2.0.19/intl/localcharset.c:387: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/gftp-2.0.19/intl/localcharset.c:416: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 (buf, dot, modifier - dot); data/gftp-2.0.19/intl/localcharset.c:432:4: [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/gftp-2.0.19/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/gftp-2.0.19/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/gftp-2.0.19/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), "rc"); data/gftp-2.0.19/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/gftp-2.0.19/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/gftp-2.0.19/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/gftp-2.0.19/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/gftp-2.0.19/intl/localename.c:723: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/gftp-2.0.19/intl/localename.c:723: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/gftp-2.0.19/intl/localename.c:861: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/gftp-2.0.19/intl/localename.c:861: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/gftp-2.0.19/intl/localename.c:891: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/gftp-2.0.19/intl/localename.c:891: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/gftp-2.0.19/intl/localename.c:1054:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[256]; data/gftp-2.0.19/intl/log.c:87: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/gftp-2.0.19/intl/os2compat.c:42: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/gftp-2.0.19/intl/os2compat.c:61: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/gftp-2.0.19/intl/os2compat.c:62: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/gftp-2.0.19/intl/os2compat.c:75: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/gftp-2.0.19/intl/os2compat.c:76: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/gftp-2.0.19/intl/os2compat.c:89: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/gftp-2.0.19/intl/os2compat.c:90: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/gftp-2.0.19/intl/plural.c:1052: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/gftp-2.0.19/intl/plural.c:1069: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 yyformat[sizeof yyunexpected data/gftp-2.0.19/intl/plural.c:1237: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/gftp-2.0.19/intl/printf.c:217: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 (resultbuf, result, pruned_length); data/gftp-2.0.19/intl/printf.c:391: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 (resultbuf, result, pruned_length * sizeof (wchar_t)); data/gftp-2.0.19/intl/relocatable.c:122: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 (memory, orig_prefix_arg, orig_prefix_len + 1); data/gftp-2.0.19/intl/relocatable.c:125: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 (memory, curr_prefix_arg, curr_prefix_len + 1); data/gftp-2.0.19/intl/relocatable.c:206: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/gftp-2.0.19/intl/relocatable.c:269: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/gftp-2.0.19/intl/relocatable.c:296: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/gftp-2.0.19/intl/relocatable.c:310: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. static char location_as_posix_path[2 * MAX_PATH]; data/gftp-2.0.19/intl/relocatable.c:340: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/gftp-2.0.19/intl/relocatable.c:458: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, curr_prefix, curr_prefix_len); data/gftp-2.0.19/intl/textdomain.c:101: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/gftp-2.0.19/intl/vasnprintf.c:170: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/gftp-2.0.19/intl/vasnprintf.c:222: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/gftp-2.0.19/intl/vasnprintf.c:223: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/gftp-2.0.19/intl/vasnprintf.c:447: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/gftp-2.0.19/intl/vasnprintf.c:554: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 (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); data/gftp-2.0.19/intl/vasnprintf.c:2302: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 ((char *) p, "%+d", exponent); data/gftp-2.0.19/intl/vasnprintf.c:2308: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 expbuf[6 + 1]; data/gftp-2.0.19/intl/vasnprintf.c:2310: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 (expbuf, "%+d", exponent); data/gftp-2.0.19/intl/vasnprintf.c:2453: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 ((char *) p, "%+d", exponent); data/gftp-2.0.19/intl/vasnprintf.c:2459: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 expbuf[6 + 1]; data/gftp-2.0.19/intl/vasnprintf.c:2461: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 (expbuf, "%+d", exponent); data/gftp-2.0.19/intl/vasnprintf.c:2526: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 + length, tmp, count * sizeof (DCHAR_T)); data/gftp-2.0.19/intl/vasnprintf.c:2887:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf ((char *) p, "%+.2d", exponent); data/gftp-2.0.19/intl/vasnprintf.c:2893: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 expbuf[6 + 1]; data/gftp-2.0.19/intl/vasnprintf.c:2895:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (expbuf, "%+.2d", exponent); data/gftp-2.0.19/intl/vasnprintf.c:3044:10: [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/gftp-2.0.19/intl/vasnprintf.c:3050: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. char expbuf[6 + 1]; data/gftp-2.0.19/intl/vasnprintf.c:3052:10: [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/gftp-2.0.19/intl/vasnprintf.c:3261:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/gftp-2.0.19/intl/vasnprintf.c:3431:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[6 + 1]; data/gftp-2.0.19/intl/vasnprintf.c:3556: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 + length, tmp, count * sizeof (DCHAR_T)); data/gftp-2.0.19/intl/vasnprintf.c:3937: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 (fbp, dp->width_start, n * sizeof (TCHAR_T)); data/gftp-2.0.19/intl/vasnprintf.c:3958: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 (fbp, dp->precision_start, n * sizeof (TCHAR_T)); data/gftp-2.0.19/intl/vasnprintf.c:4595: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 + length, tmp, count * sizeof (DCHAR_T)); data/gftp-2.0.19/lib/cache.c:158:19: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((cache_fd = mkstemp (tempstr)) < 0) data/gftp-2.0.19/lib/cache.c:200: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 *indexfile, buf[BUFSIZ], description[BUFSIZ]; data/gftp-2.0.19/lib/cache.c:271: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 *indexfile, buf[BUFSIZ]; data/gftp-2.0.19/lib/cache.c:303: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 *oldindexfile, *newindexfile, buf[BUFSIZ], description[BUFSIZ]; data/gftp-2.0.19/lib/charset-conv.c:48: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 (ret, *curpos, retlen); data/gftp-2.0.19/lib/config_file.c:121: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[8192]; data/gftp-2.0.19/lib/config_file.c:174: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 *tempstr, *temp1str, buf[255], *curpos; data/gftp-2.0.19/lib/config_file.c:201:17: [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). if ((bmfile = fopen (tempstr, "r")) == NULL) data/gftp-2.0.19/lib/config_file.c:308: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 (&newentry->local_options_vars[newentry->num_local_options_vars - 1], global_entry, data/gftp-2.0.19/lib/config_file.c:540: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 *tempstr, *temp1str, *curpos, buf[255]; data/gftp-2.0.19/lib/config_file.c:617:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((conffile = fopen (tempstr, "r")) == NULL) data/gftp-2.0.19/lib/config_file.c:675:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((gftp_logfd = fopen (tempstr, "w")) == NULL) data/gftp-2.0.19/lib/config_file.c:727: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 *bmhdr, *pwhdr, *tempstr, *password, buf[256]; data/gftp-2.0.19/lib/config_file.c:741:17: [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). if ((bmfile = fopen (tempstr, "w+")) == NULL) data/gftp-2.0.19/lib/config_file.c:824: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 *tempstr, buf[256]; data/gftp-2.0.19/lib/config_file.c:836:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((conffile = fopen (tempstr, "w+")) == NULL) data/gftp-2.0.19/lib/config_file.c:1157:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (dest_cv->value, cv->value, sizeof (gftp_color)); data/gftp-2.0.19/lib/config_file.c:1402: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 (&request->local_options_vars[request->num_local_options_vars - 1], tmpconfigvar, sizeof (*tmpconfigvar)); data/gftp-2.0.19/lib/config_file.c:1449: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 (&bm->local_options_vars[bm->num_local_options_vars - 1], tmpconfigvar, sizeof (*tmpconfigvar)); data/gftp-2.0.19/lib/config_file.c:1486: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_options_vars, orig_options, data/gftp-2.0.19/lib/config_file.c:1614: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 (newhosts, oldhosts, sizeof (*newhosts)); data/gftp-2.0.19/lib/fsplib/fsplib.c:49: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(out->buf,dirname,len+1); data/gftp-2.0.19/lib/fsplib/fsplib.c:62: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(out->buf+out->len,s->password,len+1); data/gftp-2.0.19/lib/fsplib/fsplib.c:107: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(tmp,filename,pos); data/gftp-2.0.19/lib/fsplib/fsplib.c:142: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(ptr+FSP_HSIZE,p->buf,p->len); data/gftp-2.0.19/lib/fsplib/fsplib.c:145: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(ptr+used,p->buf+p->len,p->xlen); data/gftp-2.0.19/lib/fsplib/fsplib.c:215: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(p->buf,ptr+FSP_HSIZE,recv_len - FSP_HSIZE); data/gftp-2.0.19/lib/fsplib/fsplib.c:225:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FSP_MAXPACKET]; data/gftp-2.0.19/lib/fsplib/fsplib.c:412: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 port_s[6]; data/gftp-2.0.19/lib/fsplib/fsplib.c:422:9: [2] (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). Risk is low because the source is a constant string. strcpy(port_s,"fsp"); data/gftp-2.0.19/lib/fsplib/fsplib.c:424:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(port_s,"%hu",port); data/gftp-2.0.19/lib/fsplib/fsplib.c:571: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(dir->data + pos, in.buf,in.len); data/gftp-2.0.19/lib/fsplib/fsplib.c:904: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(ptr,file->in.buf+file->bufpos,havebytes); data/gftp-2.0.19/lib/fsplib/fsplib.c:912: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(ptr,file->in.buf+file->bufpos,total); data/gftp-2.0.19/lib/fsplib/fsplib.c:960: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->out.buf+file->bufpos,ptr,freebytes); data/gftp-2.0.19/lib/fsplib/fsplib.c:967: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->out.buf+file->bufpos,ptr,total); data/gftp-2.0.19/lib/fsplib/fsplib.c:1284: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(out.buf+out.len,to,l); data/gftp-2.0.19/lib/fsplib/fsplib.c:1296: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(out.buf+out.len+out.xlen,s->password,l); data/gftp-2.0.19/lib/fsplib/fsplib.h:92:34: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[FSP_SPACE]; /* packet payload */ data/gftp-2.0.19/lib/fsplib/fsplib.h:125: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. char name[255 + 1]; /* entry name */ data/gftp-2.0.19/lib/fsplib/fsplib.h:148: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 fill[offsetof (struct dirent, d_name) + MAXNAMLEN + 1]; data/gftp-2.0.19/lib/fsplib/lock.c:100: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(lock->key_string,O_RDWR|O_CREAT,0666); data/gftp-2.0.19/lib/fsplib/lock.c:271:21: [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). lock->lock_fd = open(lock->key_string, O_RDWR | O_CREAT, 0666); data/gftp-2.0.19/lib/fsplib/lock.h:17: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_string[sizeof(FSP_KEY_PREFIX)+32]; data/gftp-2.0.19/lib/fsplib/lock.h:30: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 key_string[sizeof(FSP_KEY_PREFIX)+32]; data/gftp-2.0.19/lib/local.c:60: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 tempstr[PATH_MAX]; data/gftp-2.0.19/lib/misc.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 *frompos, *topos, src[50], *dest; data/gftp-2.0.19/lib/misc.c:258: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 search_str[20], *newpos; data/gftp-2.0.19/lib/misc.c:433:15: [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. for (i=0; ((char *) key)[i] != '\0' && i < 3; i++) data/gftp-2.0.19/lib/misc.c:434: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. ret += ((char *) key)[i]; data/gftp-2.0.19/lib/misc.c:479: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 (newfle, fle, sizeof (*newfle)); data/gftp-2.0.19/lib/misc.c:502: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 *strarr[3][2]; data/gftp-2.0.19/lib/misc.c:613: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 (newreq->remote_addr, req->remote_addr, req->remote_addr_len); data/gftp-2.0.19/lib/misc.c:887: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 *tempstr1, *tempstr2, *ret, tstr[50], *attribs, *utf8; data/gftp-2.0.19/lib/misc.c:940:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char table[64], encode[3]; data/gftp-2.0.19/lib/mkstemps.c:124:12: [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_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd"); data/gftp-2.0.19/lib/mkstemps.c:126:12: [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_RDWR|O_CREAT|O_EXCL, 0600); data/gftp-2.0.19/lib/parse-dir-listing.c:210: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 *curpos, *endpos, tempstr[1024]; data/gftp-2.0.19/lib/protocols.c:420:20: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). char *slashpos, *tmpfile, *utf8; data/gftp-2.0.19/lib/protocols.c:453:40: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). tmpfile, fle->file, request->directory, data/gftp-2.0.19/lib/protocols.c:457:23: [2] (tmpfile) tmpfile: Function tmpfile() has a security flaw on some systems (e.g., older System V systems) (CWE-377). fle->file = tmpfile; data/gftp-2.0.19/lib/protocols.c:1619: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 (pathname, flags); data/gftp-2.0.19/lib/protocols.c:1621: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 (pathname, flags, mode); data/gftp-2.0.19/lib/pty.c:53:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((new_fds = open (pts_name, O_RDWR)) < 0) data/gftp-2.0.19/lib/pty.c:82:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fdm = open ("/dev/ptmx", O_RDWR)) < 0) data/gftp-2.0.19/lib/pty.c:118:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((new_fds = open (pts_name, O_RDWR)) < 0) data/gftp-2.0.19/lib/pty.c:205:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fdm = open (pts_name, O_RDWR)) < 0) data/gftp-2.0.19/lib/pty.c:225:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((new_fds = open (pts_name, O_RDWR)) < 0) data/gftp-2.0.19/lib/pty.c:292: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 pts_name[64]; data/gftp-2.0.19/lib/rfc2068.c:97: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 tempstr[8192]; data/gftp-2.0.19/lib/rfc2068.c:166: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 (params->extra_read_buffer, params->rbuf->curpos + (params->rbuf->cur_bufsize - params->extra_read_buffer_len), params->extra_read_buffer_len); data/gftp-2.0.19/lib/rfc2068.c:344: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 (buf, params->rbuf->curpos, len); data/gftp-2.0.19/lib/rfc2068.c:592: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 tempstr[8192]; data/gftp-2.0.19/lib/rfc2068.c:713: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 (ptr, params->extra_read_buffer, params->extra_read_buffer_len); data/gftp-2.0.19/lib/rfc2068.c:778: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 *) ptr)[sret] = '\0'; data/gftp-2.0.19/lib/rfc2068.c:804: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 (params->extra_read_buffer, stpos, current_size); data/gftp-2.0.19/lib/rfc959.c:97: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 tempstr[255], code[4]; data/gftp-2.0.19/lib/rfc959.c:245: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 *startpos, *endpos, *newstr, *newval, tempport[6], *proxy_config, *utf8, data/gftp-2.0.19/lib/rfc959.c:318:11: [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 (newstr, "\r\n"); data/gftp-2.0.19/lib/rfc959.c:697:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ad[6]; data/gftp-2.0.19/lib/rfc959.c:764: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 (&data_addr.sin_port, &ad[4], 2); data/gftp-2.0.19/lib/rfc959.c:770: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 (&data_addr.sin_addr, request->remote_addr, data/gftp-2.0.19/lib/rfc959.c:780: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 (&data_addr.sin_addr, &ad[0], 4); data/gftp-2.0.19/lib/rfc959.c:866: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 *pos, buf[64], *command; data/gftp-2.0.19/lib/rfc959.c:938: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 (&data_addr, request->remote_addr, request->remote_addr_len); data/gftp-2.0.19/lib/rfc959.c:953: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 (&data_addr, request->remote_addr, request->remote_addr_len); data/gftp-2.0.19/lib/rfc959.c:1387: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 *tempstr, parms[3]; data/gftp-2.0.19/lib/rfc959.c:1552: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 tempstr[1024]; data/gftp-2.0.19/lib/socket-connect-getaddrinfo.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 serv[8], *connect_host; data/gftp-2.0.19/lib/socket-connect-getaddrinfo.c:148: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 (request->remote_addr, &((struct sockaddr_in *) current_hostp->ai_addr)->sin_addr, data/gftp-2.0.19/lib/socket-connect-gethostbyname.c:129: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 (&remote_address.sin_addr, data/gftp-2.0.19/lib/socket-connect-gethostbyname.c:155: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 (request->remote_addr, &host.h_addr_list[curhost], data/gftp-2.0.19/lib/socket-connect.c:30:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char addy[4]; data/gftp-2.0.19/lib/socket-connect.c:83: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 (addy, request->remote_addr, sizeof (*addy)); data/gftp-2.0.19/lib/sshv2.c:58: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 handle[SSH_MAX_HANDLE_SIZE + 4], /* We'll encode the ID in here too */ data/gftp-2.0.19/lib/sshv2.c:153: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 (ret, &num, 4); data/gftp-2.0.19/lib/sshv2.c:165: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 (buf, &num, 4); data/gftp-2.0.19/lib/sshv2.c:166: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 (buf + 4, str, len); data/gftp-2.0.19/lib/sshv2.c:276:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tempstr[2048], *curpos, *endpos, save_char; data/gftp-2.0.19/lib/sshv2.c:586: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 (&id, message, 4); data/gftp-2.0.19/lib/sshv2.c:603: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 (&num, message + 4, 4); data/gftp-2.0.19/lib/sshv2.c:655: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 (&num, message + 4, 4); data/gftp-2.0.19/lib/sshv2.c:658: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 (&stattype, message + 8 + num, 4); data/gftp-2.0.19/lib/sshv2.c:660: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 (&attr, message + 12 + num, 4); data/gftp-2.0.19/lib/sshv2.c:685: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 (&num, message + 4, 4); data/gftp-2.0.19/lib/sshv2.c:728: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 (&num, message + 4, 4); data/gftp-2.0.19/lib/sshv2.c:745: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[34000]; data/gftp-2.0.19/lib/sshv2.c:758: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 (buf, &clen, 4); data/gftp-2.0.19/lib/sshv2.c:760: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 (&buf[5], command, len); data/gftp-2.0.19/lib/sshv2.c:783: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[6], error_buffer[255], *pos; data/gftp-2.0.19/lib/sshv2.c:804: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 (&message->length, buf, 4); data/gftp-2.0.19/lib/sshv2.c:918: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 (&num, message->buffer + 4, 4); data/gftp-2.0.19/lib/sshv2.c:965: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 (&snum, message->pos, 4); data/gftp-2.0.19/lib/sshv2.c:1036: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 (string, message->pos, len); data/gftp-2.0.19/lib/sshv2.c:1286: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 (params->handle, &len, 4); data/gftp-2.0.19/lib/sshv2.c:1354: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 (params->handle + 4, message.buffer + 4, message.length - 5); data/gftp-2.0.19/lib/sshv2.c:1467: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 (params->handle, &len, 4); data/gftp-2.0.19/lib/sshv2.c:1482: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 (request->last_dir_entry, &len, 4); data/gftp-2.0.19/lib/sshv2.c:1484: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 (request->last_dir_entry + 5, params->message.buffer, data/gftp-2.0.19/lib/sshv2.c:1628: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 (endpos, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1631: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 (endpos + 4, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1704: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 (endpos, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1707: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 (endpos + 4, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1708: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 (endpos + 8, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1822: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 (endpos, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1847: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 (params->handle + 4, message.buffer + 4, message.length - 5); data/gftp-2.0.19/lib/sshv2.c:1898: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 (buf + params->handle_len, &hinum, 4); data/gftp-2.0.19/lib/sshv2.c:1899: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 (buf + params->handle_len + 4, &lownum, 4); data/gftp-2.0.19/lib/sshv2.c:1922: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 (params->transfer_buffer, params->handle, params->handle_len); data/gftp-2.0.19/lib/sshv2.c:1926: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 (params->transfer_buffer, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1931: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 (params->transfer_buffer + params->handle_len + 8, &num, 4); data/gftp-2.0.19/lib/sshv2.c:1952: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 (&num, message.buffer + 4, 4); data/gftp-2.0.19/lib/sshv2.c:1965: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 (buf, message.buffer + 8, num); data/gftp-2.0.19/lib/sshv2.c:1991: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 (params->transfer_buffer, params->handle, params->handle_len); data/gftp-2.0.19/lib/sshv2.c:1995: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 (params->transfer_buffer, &num, 4); data/gftp-2.0.19/lib/sshv2.c:2000: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 (params->transfer_buffer + params->handle_len + 8, &num, 4); data/gftp-2.0.19/lib/sshv2.c:2001: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 (params->transfer_buffer + params->handle_len + 12, buf, size); data/gftp-2.0.19/lib/sshv2.c:2083: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 (dparms->handle, sparms->handle, sizeof (*dparms->handle)); data/gftp-2.0.19/lib/sshv2.c:2087: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 (dparms->transfer_buffer, sparms->transfer_buffer, data/gftp-2.0.19/lib/sslcommon.c:86: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 issuer[256], subject[256]; data/gftp-2.0.19/lib/sslcommon.c:119: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[256], *extstr; data/gftp-2.0.19/src/gtk/bookmarks.c:410: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 *pos, *text[2]; data/gftp-2.0.19/src/gtk/bookmarks.c:583: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 *text[2], *pos; data/gftp-2.0.19/src/gtk/dnd.c:266: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 (tempstr, oldpos, len); data/gftp-2.0.19/src/gtk/gftp-gtk.c:782: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 *titles[7], tempstr[50], *startup_directory; data/gftp-2.0.19/src/gtk/gftp-gtk.c:911: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 *dltitles[2]; data/gftp-2.0.19/src/gtk/gftp-gtk.c:1181: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 sortcol_name[25], sortasds_name[25]; data/gftp-2.0.19/src/gtk/gtkui.c:570: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[BUFSIZ]; data/gftp-2.0.19/src/gtk/gtkui_transfer.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 *text[2]; data/gftp-2.0.19/src/gtk/gtkui_transfer.c: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 *dltitles[4], *add_data[4] = { NULL, NULL, NULL, NULL }, data/gftp-2.0.19/src/gtk/menu-items.c:111: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). if ((fd = fopen (filename, "w")) == NULL) data/gftp-2.0.19/src/gtk/menu-items.c:296: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). if ((fd = mkstemp (tempstr)) < 0) data/gftp-2.0.19/src/gtk/menu-items.c:360: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). if ((fd = fopen (filename, "w")) == NULL) data/gftp-2.0.19/src/gtk/menu-items.c:440: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 *tempstr, *temp1str, *no_license_agreement, *str, buf[255], *share_dir; data/gftp-2.0.19/src/gtk/menu-items.c:600: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). if ((fd = fopen (tempstr, "r")) == NULL) data/gftp-2.0.19/src/gtk/misc-gtk.c:679: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 *add_data[7] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL }; data/gftp-2.0.19/src/gtk/misc-gtk.c:1142: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 tempstr[255]; data/gftp-2.0.19/src/gtk/options_dialog.c:184: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. if (value != NULL && strcasecmp ((char *) value, clist[i]) == 0) data/gftp-2.0.19/src/gtk/options_dialog.c:329:7: [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 (ret, "%n"); data/gftp-2.0.19/src/gtk/options_dialog.c:467: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 tmp[128]; data/gftp-2.0.19/src/gtk/options_dialog.c:535: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 tempstr[20]; data/gftp-2.0.19/src/gtk/options_dialog.c:629:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tempstr[20]; data/gftp-2.0.19/src/gtk/options_dialog.c:776: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 *add_data[2]; data/gftp-2.0.19/src/gtk/options_dialog.c:1237: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 *add_data[2]; data/gftp-2.0.19/src/gtk/transfer.c:514: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 *text[2]; data/gftp-2.0.19/src/gtk/transfer.c:704: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 gotstr[50], ofstr[50]; data/gftp-2.0.19/src/gtk/transfer.c:766: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 totstr[150], winstr[150], dlstr[150]; data/gftp-2.0.19/src/gtk/view_dialog.c:214: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[8192], *view_program, *edit_program; data/gftp-2.0.19/src/gtk/view_dialog.c:286:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open (non_utf8, O_RDONLY)) < 0) data/gftp-2.0.19/src/text/gftp-text.c:96: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 tempstr[512]; data/gftp-2.0.19/src/text/gftp-text.c:162:19: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((infd = fopen (termname, "r+")) == NULL) data/gftp-2.0.19/src/text/gftp-text.c:236: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 *tempstr, prompt[20]; data/gftp-2.0.19/src/text/gftp-text.c:238: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 tempstr[512]; data/gftp-2.0.19/src/text/textui.c:76: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 tempstr[256]; data/gftp-2.0.19/src/text/textui.c:89: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 tempstr[256]; data/gftp-2.0.19/src/text/textui.c:115: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, question[1024], srcsize[50], destsize[50], *pos, defaction; data/gftp-2.0.19/src/text/textui.c:269: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[10]; data/gftp-2.0.19/src/text/textui.c:292: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[255]; data/gftp-2.0.19/src/uicommon/gftpui.c:669: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 *pos, *backpos, buf[256]; data/gftp-2.0.19/src/uicommon/gftpui.c:762: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 commands[128], cmdstr[30]; data/gftp-2.0.19/src/uicommon/gftpuicallbacks.c:148: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 *tempstr, description[BUFSIZ]; data/gftp-2.0.19/intl/bindtextdom.c:135: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/gftp-2.0.19/intl/bindtextdom.c:173: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/gftp-2.0.19/intl/bindtextdom.c:204: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/gftp-2.0.19/intl/bindtextdom.c:232: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/gftp-2.0.19/intl/bindtextdom.c:261: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/gftp-2.0.19/intl/dcigettext.c:542:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). msgid_len = strlen (msgid1) + 1; data/gftp-2.0.19/intl/dcigettext.c:636: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/gftp-2.0.19/intl/dcigettext.c:678: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/gftp-2.0.19/intl/dcigettext.c:679: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/gftp-2.0.19/intl/dcigettext.c:688: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/gftp-2.0.19/intl/dcigettext.c:782: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/gftp-2.0.19/intl/dcigettext.c:911: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/gftp-2.0.19/intl/dcigettext.c:1115: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/gftp-2.0.19/intl/dcigettext.c:1158: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/gftp-2.0.19/intl/dcigettext.c:1601: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/gftp-2.0.19/intl/eval-plural.h:88: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/gftp-2.0.19/intl/finddomain.c:94: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/gftp-2.0.19/intl/finddomain.c:134: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/gftp-2.0.19/intl/finddomain.c:157: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/gftp-2.0.19/intl/l10nflist.c:98: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/gftp-2.0.19/intl/l10nflist.c:123: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/gftp-2.0.19/intl/l10nflist.c:197: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/gftp-2.0.19/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 (territory) + 1 : 0) data/gftp-2.0.19/intl/l10nflist.c:201: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/gftp-2.0.19/intl/l10nflist.c:203: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/gftp-2.0.19/intl/l10nflist.c:205: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/gftp-2.0.19/intl/l10nflist.c:206: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/gftp-2.0.19/intl/l10nflist.c:326: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/gftp-2.0.19/intl/langprefs.c:76:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size += strlen (buf) + 1; data/gftp-2.0.19/intl/langprefs.c:108: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). p += strlen (buf); data/gftp-2.0.19/intl/loadmsgcat.c:470: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/gftp-2.0.19/intl/loadmsgcat.c:874: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/gftp-2.0.19/intl/loadmsgcat.c:1053: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/gftp-2.0.19/intl/loadmsgcat.c:1188: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/gftp-2.0.19/intl/localcharset.c:87:9: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # undef getc data/gftp-2.0.19/intl/localcharset.c:88:10: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). # define getc getc_unlocked data/gftp-2.0.19/intl/localcharset.c:128:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dir_len = strlen (dir); data/gftp-2.0.19/intl/localcharset.c:129: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 base_len = strlen (base); data/gftp-2.0.19/intl/localcharset.c:158:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/gftp-2.0.19/intl/localcharset.c:167:11: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getc (fp); data/gftp-2.0.19/intl/localcharset.c:174:12: [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/gftp-2.0.19/intl/localcharset.c:176: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). l1 = strlen (buf1); data/gftp-2.0.19/intl/localcharset.c:177: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). l2 = strlen (buf2); data/gftp-2.0.19/intl/localcharset.c:446: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/gftp-2.0.19/intl/localcharset.c:446: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/gftp-2.0.19/intl/localcharset.c:450: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). codeset = aliases + strlen (aliases) + 1; data/gftp-2.0.19/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/gftp-2.0.19/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/gftp-2.0.19/intl/localename.c:924: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/gftp-2.0.19/intl/log.c:83: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/gftp-2.0.19/intl/os2compat.c:59: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/gftp-2.0.19/intl/os2compat.c:60: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/gftp-2.0.19/intl/os2compat.c:62: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/gftp-2.0.19/intl/os2compat.c:73: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/gftp-2.0.19/intl/os2compat.c:74: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/gftp-2.0.19/intl/os2compat.c:76: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/gftp-2.0.19/intl/os2compat.c:87: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/gftp-2.0.19/intl/os2compat.c:88: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/gftp-2.0.19/intl/os2compat.c:90: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/gftp-2.0.19/intl/os2compat.c:96: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/gftp-2.0.19/intl/plural-exp.h:53: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/gftp-2.0.19/intl/plural.c:933: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/gftp-2.0.19/intl/plural.c:1855: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/gftp-2.0.19/intl/relocatable.c:115: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/gftp-2.0.19/intl/relocatable.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). curr_prefix_len = strlen (curr_prefix_arg); data/gftp-2.0.19/intl/relocatable.c:182: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/gftp-2.0.19/intl/relocatable.c:186: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/gftp-2.0.19/intl/relocatable.c:191: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/gftp-2.0.19/intl/relocatable.c:214: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/gftp-2.0.19/intl/relocatable.c:215: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/gftp-2.0.19/intl/relocatable.c:317:6: [1] (buffer) strlen: Does not handle 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 (location_as_posix_path) >= MAX_PATH - 1) data/gftp-2.0.19/intl/relocatable.c:354:19: [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/gftp-2.0.19/intl/relocatable.c:373:15: [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/gftp-2.0.19/intl/relocatable.c:452:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1); data/gftp-2.0.19/intl/textdomain.c:98: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/gftp-2.0.19/intl/vasnprintf.c:128: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/gftp-2.0.19/intl/vasnprintf.c:2778:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/gftp-2.0.19/intl/vasnprintf.c:2838: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). ndigits = strlen (digits); data/gftp-2.0.19/intl/vasnprintf.c:2950: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). ndigits = strlen (digits); data/gftp-2.0.19/intl/vasnprintf.c:3134:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ndigits = strlen (digits); data/gftp-2.0.19/intl/vasnprintf.c:3191: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). ndigits = strlen (digits); data/gftp-2.0.19/intl/vasnprintf.c:3316: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). ndigits = strlen (digits); data/gftp-2.0.19/intl/vasnprintf.c:3820: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). tmp_length = strlen (a.arg[dp->arg_index].a.a_string); data/gftp-2.0.19/lib/cache.c:179: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). ret = gftp_fd_write (NULL, temp1str, strlen (temp1str), fd); data/gftp-2.0.19/lib/cache.c:321:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (description, descr, sizeof (description)); data/gftp-2.0.19/lib/cache.c:355: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). if (strncmp (centry.url, description, strlen (description)) == 0) data/gftp-2.0.19/lib/cache.c:376:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (buf); data/gftp-2.0.19/lib/charset-conv.c:38:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (*curpos) - 1; /* the trailing ',' should be omitted */ data/gftp-2.0.19/lib/config_file.c:82: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). if (newentry->path[strlen (newentry->path) - 1] == '/') data/gftp-2.0.19/lib/config_file.c:84: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). newentry->path[strlen (newentry->path) - 1] = '\0'; data/gftp-2.0.19/lib/config_file.c:139:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read (srcfd, buf, sizeof (buf))) > 0) data/gftp-2.0.19/lib/config_file.c:213:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (buf); data/gftp-2.0.19/lib/config_file.c:350: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). endpos = curpos + strlen (curpos); data/gftp-2.0.19/lib/config_file.c:364: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). endpos = curpos + strlen (curpos); data/gftp-2.0.19/lib/config_file.c:483: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). tempext->stlen = strlen (tempext->ext); data/gftp-2.0.19/lib/config_file.c:628:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (buf); data/gftp-2.0.19/lib/config_file.c:698: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). while (strlen (pos) > 76) data/gftp-2.0.19/lib/config_file.c:716: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 (pos) > 1) data/gftp-2.0.19/lib/config_file.c:718: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). fwrite (pos, 1, strlen (pos), fd); data/gftp-2.0.19/lib/fsplib/fsplib.c:42:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=strlen(dirname); data/gftp-2.0.19/lib/fsplib/fsplib.c:56:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len=strlen(s->password); data/gftp-2.0.19/lib/fsplib/fsplib.c:629: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). rc=fentry.namlen-strlen(fentry.name); data/gftp-2.0.19/lib/fsplib/fsplib.c:638:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry->d_name,fentry.name,MAXNAMLEN); data/gftp-2.0.19/lib/fsplib/fsplib.c:709:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(entry->name,(char *)( dir->data + dir->dirpos ),255); data/gftp-2.0.19/lib/fsplib/fsplib.c:713: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). namelen = strlen( (char *) dir->data+dir->dirpos); data/gftp-2.0.19/lib/fsplib/fsplib.c:1278:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). l=strlen(to)+1; data/gftp-2.0.19/lib/fsplib/fsplib.c:1289: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). l=strlen(s->password)+1; data/gftp-2.0.19/lib/fsplib/lock.c:99:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(0); data/gftp-2.0.19/lib/fsplib/lock.c:101:3: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(omask); data/gftp-2.0.19/lib/fsplib/lock.c:229:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(lock->lock_fd, &okey, sizeof(okey)) < 0) data/gftp-2.0.19/lib/fsplib/lock.c:270:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). omask = umask(0); data/gftp-2.0.19/lib/fsplib/lock.c:272:11: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). (void)umask(omask); data/gftp-2.0.19/lib/local.c:417: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). if (request->directory[strlen (request->directory) - 1] != '/') data/gftp-2.0.19/lib/misc.c:53:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (src); data/gftp-2.0.19/lib/misc.c:58:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy (dest_str, "0", dest_len); data/gftp-2.0.19/lib/misc.c:82: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). srclen = strlen (src); data/gftp-2.0.19/lib/misc.c:117:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pos = str + strlen (str) - 1; data/gftp-2.0.19/lib/misc.c:174: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). endpos = pos + strlen (pos); data/gftp-2.0.19/lib/misc.c:956: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). slen = strlen (str); data/gftp-2.0.19/lib/misc.c:1131: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). retlen = strlen (ret); data/gftp-2.0.19/lib/misc.c:1138:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (element); data/gftp-2.0.19/lib/misc.c:1157:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant character. strncat (ret, "/", retlen); data/gftp-2.0.19/lib/misc.c:1159:7: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat (ret, element, retlen); data/gftp-2.0.19/lib/misc.c:1198:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newstr = g_malloc0 ((gulong) strlen (password) * 2 + 2); data/gftp-2.0.19/lib/misc.c:1226:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newstr = g_malloc0 ((gulong) strlen (passwordpos) / 2 + 1); data/gftp-2.0.19/lib/mkstemps.c:87:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (template); data/gftp-2.0.19/lib/parse-dir-listing.c:104: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). slen = strlen (str); data/gftp-2.0.19/lib/parse-dir-listing.c:233: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 (str) > 4 && strcmp (curpos - 4, ".DIR") == 0) data/gftp-2.0.19/lib/parse-dir-listing.c:425: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 (attribs) < 10) data/gftp-2.0.19/lib/parse-dir-listing.c:596:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (str); data/gftp-2.0.19/lib/protocols.c:626: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). for (pos = new_url + strlen (new_url) - 1; data/gftp-2.0.19/lib/protocols.c:703: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). endpos = pos + strlen (pos) - 1; data/gftp-2.0.19/lib/protocols.c:1463:11: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (waitusecs); data/gftp-2.0.19/lib/pty.c:41:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (pts_name, new_pts_name, len); data/gftp-2.0.19/lib/pty.c:106:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (pts_name, new_pts_name, len); data/gftp-2.0.19/lib/pty.c:196:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy (pts_name, "/dev/ptyXY", len); data/gftp-2.0.19/lib/rfc2068.c:198: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). ret = request->write_function (request, tempstr, strlen (tempstr), data/gftp-2.0.19/lib/rfc2068.c:316:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (request->last_ftp_response); data/gftp-2.0.19/lib/rfc2068.c:396:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (request->directory, "/", strlen (request->directory)) == 0) data/gftp-2.0.19/lib/rfc2068.c:417: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 (request->last_ftp_response) > 9 && data/gftp-2.0.19/lib/rfc2068.c:626:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (tempstr); data/gftp-2.0.19/lib/rfc959.c:122:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (code, tempstr, 3); data/gftp-2.0.19/lib/rfc959.c:180: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). command_len = strlen (command); data/gftp-2.0.19/lib/rfc959.c:224:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (argument); data/gftp-2.0.19/lib/rfc959.c:227: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). len += strlen (command) + 3; data/gftp-2.0.19/lib/rfc959.c:232:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (command) + 2; data/gftp-2.0.19/lib/rfc959.c:315: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). len += strlen (startpos) + 2; data/gftp-2.0.19/lib/rfc959.c:333: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). len += strlen (startpos); data/gftp-2.0.19/lib/rfc959.c:343: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). len += strlen (utf8); data/gftp-2.0.19/lib/rfc959.c:345: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). len += strlen (newval); data/gftp-2.0.19/lib/rfc959.c:1104: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). stlen = strlen (filename); data/gftp-2.0.19/lib/rfc959.c:1583:35: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp (tempstr, "total", strlen ("total")) != 0 && data/gftp-2.0.19/lib/rfc959.c:1584: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). strncmp (tempstr, _("total"), strlen (_("total"))) != 0) data/gftp-2.0.19/lib/rfc959.c:1596: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). stlen = strlen (tempstr); data/gftp-2.0.19/lib/rfc959.c:1773:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (command) + 7; data/gftp-2.0.19/lib/rfc959.c:1778:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (command) + 2; data/gftp-2.0.19/lib/socket-connect.c:71: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). hostlen = strlen (request->hostname); data/gftp-2.0.19/lib/socket-connect.c:72: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). domlen = strlen (hostname->domain); data/gftp-2.0.19/lib/sockutils.c:83:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (str, (*rbuf)->curpos, len); data/gftp-2.0.19/lib/sockutils.c:198:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((ret = read (fd, ptr, size)) < 0) data/gftp-2.0.19/lib/sockutils.c:322: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). ret = request->write_function (request, tempstr, strlen (tempstr), fd); data/gftp-2.0.19/lib/sshv2.c:164: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). num = htonl (strlen (str)); data/gftp-2.0.19/lib/sshv2.c:184: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). pathlen = strlen (str); data/gftp-2.0.19/lib/sshv2.c:216: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). *len = strlen (path); data/gftp-2.0.19/lib/sshv2.c:284: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). *logstr_len += strlen (tempstr); data/gftp-2.0.19/lib/sshv2.c:348: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). logstr_len = strlen (logstr); data/gftp-2.0.19/lib/sshv2.c:489:46: [1] (buffer) strlen: Does not handle 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 (gftp_fd_write (request, pwstr, strlen (pwstr), ptymfd) < 0) data/gftp-2.0.19/lib/sshv2.c:506: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 (gftp_fd_write (request, yesstr, strlen (yesstr), ptymfd) < 0) data/gftp-2.0.19/lib/sshv2.c:529: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). ret = gftp_fd_write (request, temp1str, strlen (temp1str), ptymfd); data/gftp-2.0.19/lib/sshv2.c:531:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memset (temp1str, 0, strlen (temp1str)); data/gftp-2.0.19/lib/sshv2.c:533: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). memset (securid_pass, 0, strlen (securid_pass)); data/gftp-2.0.19/lib/sslcommon.c:185:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t hostname_len = strlen (data) - 1; data/gftp-2.0.19/lib/sslcommon.c:186:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (request->hostname) > hostname_len && data/gftp-2.0.19/lib/sslcommon.c:187:59: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strcasecmp (&(data[1]), &(request->hostname[strlen (request->hostname) - hostname_len])) == 0) data/gftp-2.0.19/src/gtk/bookmarks.c:84: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). dpos = tempentry->path = g_malloc0 ((gulong) strlen (edttxt) + 1); data/gftp-2.0.19/src/gtk/bookmarks.c:682: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). oldpathlen = strlen (entry->path); data/gftp-2.0.19/src/gtk/dnd.c:43: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). if (url[strlen (url) - 1] == '/') data/gftp-2.0.19/src/gtk/dnd.c:46: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). url[strlen (url) - 1] = '\0'; data/gftp-2.0.19/src/gtk/dnd.c:205: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). tempstr[strlen (tempstr) - 1] = '/'; data/gftp-2.0.19/src/gtk/dnd.c:207: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). tempstr[strlen (tempstr) - 1] = '\0'; data/gftp-2.0.19/src/gtk/dnd.c:209: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). totlen += strlen (tempstr); data/gftp-2.0.19/src/gtk/dnd.c:214:11: [1] (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). Risk is low because the source is a constant character. strcpy (str + oldlen, "\n"); data/gftp-2.0.19/src/gtk/dnd.c:228: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). (unsigned char *) str, strlen (str)); data/gftp-2.0.19/src/gtk/gtkui.c:172:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read (request->wakeup_main_thread[0], &c, 1); data/gftp-2.0.19/src/gtk/gtkui.c:554:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (buf, gtk_entry_get_text (GTK_ENTRY (ddata->edit)), BUFSIZ); data/gftp-2.0.19/src/gtk/gtkui_transfer.c:301:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (tdata->toreq->directory); data/gftp-2.0.19/src/gtk/menu-items.c:318: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). textlen = strlen (txt); data/gftp-2.0.19/src/gtk/menu-items.c:380: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). textlen = strlen (txt); data/gftp-2.0.19/src/gtk/menu-items.c:495: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). (gulong) (strlen (tempstr) + strlen (str) + 1)); data/gftp-2.0.19/src/gtk/menu-items.c:495:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (gulong) (strlen (tempstr) + strlen (str) + 1)); data/gftp-2.0.19/src/gtk/misc-gtk.c:102: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). if (fwrite (logstr, strlen (logstr), 1, gftp_logfd) != 1) data/gftp-2.0.19/src/gtk/misc-gtk.c:599: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). strip_prefix_len = strlen (strip_prefix); data/gftp-2.0.19/src/gtk/misc-gtk.c:728:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). stlen = strlen (fle->file); data/gftp-2.0.19/src/gtk/misc-gtk.c:979:60: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gtk_entry_select_region (GTK_ENTRY (ddata->edit), 0, strlen (deftext)); data/gftp-2.0.19/src/gtk/options_dialog.c:291: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). len += strlen (stpos) + 1; data/gftp-2.0.19/src/gtk/options_dialog.c:294: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 (ret, "\n"); data/gftp-2.0.19/src/gtk/options_dialog.c:301: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). len += strlen (stpos); data/gftp-2.0.19/src/gtk/options_dialog.c:326: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). len += strlen (stpos) + 2; data/gftp-2.0.19/src/gtk/options_dialog.c:336: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). len += strlen (stpos); data/gftp-2.0.19/src/gtk/view_dialog.c:69:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). new_fle->fd = mkstemps (new_fle->destfile, strlen (suffix)); data/gftp-2.0.19/src/gtk/view_dialog.c:230: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). stlen = strlen (filename); data/gftp-2.0.19/src/gtk/view_dialog.c:399:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((n = read (fd, buf, sizeof (buf) - 1)) > 0) data/gftp-2.0.19/src/text/gftp-text.c:56: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). endpos = stpos + strlen (stpos); data/gftp-2.0.19/src/text/gftp-text.c:61:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (stpos) <= sw) data/gftp-2.0.19/src/text/gftp-text.c:123: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). fwrite (tempstr, 1, strlen (tempstr), gftp_logfd); data/gftp-2.0.19/src/text/gftp-text.c:191:20: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). singlechar = fgetc (infd); data/gftp-2.0.19/src/text/gftp-text.c:213: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). for (pos = buf + strlen (buf) - 1; *pos == ' ' || *pos == '\r' || data/gftp-2.0.19/src/uicommon/gftpui.c:811:11: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant character. strncpy (commands, "\t", sizeof (commands)); data/gftp-2.0.19/src/uicommon/gftpui.c:812: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). size_t cmd_len = sizeof(commands) - strlen (commands); data/gftp-2.0.19/src/uicommon/gftpui.c:822:15: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat (commands, cmdstr, cmd_len); data/gftp-2.0.19/src/uicommon/gftpui.c:823: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). cmd_len -= strlen(cmdstr); data/gftp-2.0.19/src/uicommon/gftpui.c:1026:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (newstr); data/gftp-2.0.19/src/uicommon/gftpui.c:1046: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). cmdlen = strlen (newstr); ANALYSIS SUMMARY: Hits = 607 Lines analyzed = 51294 in approximately 1.18 seconds (43357 lines/second) Physical Source Lines of Code (SLOC) = 38806 Hits@level = [0] 123 [1] 213 [2] 276 [3] 40 [4] 69 [5] 9 Hits@level+ = [0+] 730 [1+] 607 [2+] 394 [3+] 118 [4+] 78 [5+] 9 Hits/KSLOC@level+ = [0+] 18.8115 [1+] 15.6419 [2+] 10.1531 [3+] 3.04077 [4+] 2.01 [5+] 0.231923 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.