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/globus-gridftp-server-13.20/globus_gridftp_server.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_ftp_response_error.c Examining data/globus-gridftp-server-13.20/gfs_i_gfork_plugin.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c Examining data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c Examining data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h Examining data/globus-gridftp-server-13.20/globus_i_gridftp_server.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_log.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_ipc.c Examining data/globus-gridftp-server-13.20/gfs_dynbe_client.c Examining data/globus-gridftp-server-13.20/gfs_gfork_master.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_config.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_control.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_brain.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_embed.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_cas.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_control.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_acl.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_config.c Examining data/globus-gridftp-server-13.20/globus_gridftp_server_embed.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_data.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_data.h Examining data/globus-gridftp-server-13.20/globus_i_gfs_log.h Examining data/globus-gridftp-server-13.20/test/error_response_test.c Examining data/globus-gridftp-server-13.20/test/cmp_alias_ent_test.c Examining data/globus-gridftp-server-13.20/test/ipc-test.c Examining data/globus-gridftp-server-13.20/test/sharing_allowed_test.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_acl.c Examining data/globus-gridftp-server-13.20/globus_i_gfs_acl_test.c Examining data/globus-gridftp-server-13.20/globus_gridftp_server.h FINAL RESULTS: data/globus-gridftp-server-13.20/globus_gridftp_server.c:33:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #define chown(x,y,z) -1 data/globus-gridftp-server-13.20/globus_gridftp_server.c:35:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink(x,y,z) 0 data/globus-gridftp-server-13.20/globus_i_gfs_config.c:29:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #define chown(x,y,z) -1 data/globus-gridftp-server-13.20/globus_i_gfs_config.c:31:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink(x,y,z) 0 data/globus-gridftp-server-13.20/globus_i_gfs_control.c:28:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #define chown(x,y,z) -1 data/globus-gridftp-server-13.20/globus_i_gfs_control.c:30:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink(x,y,z) 0 data/globus-gridftp-server-13.20/globus_i_gfs_data.c:34:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #define chown(x,y,z) -1 data/globus-gridftp-server-13.20/globus_i_gfs_data.c:36:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink(x,y,z) 0 data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6292:34: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. rc = chmod(share_file, S_IRUSR); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:276:30: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. rc = chmod(logfilename, mode); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:343:26: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. rc = chmod(logfilename, mode); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:36:9: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #define chown(x,y,z) -1 data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:38:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. #define readlink(x,y,z) 0 data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:822:26: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. int nchars = readlink(stat_info->pathname, symlink_target, MAXPATHLEN); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1173:38: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. int nchars = readlink(path, symlink_target, MAXPATHLEN); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1609:10: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. rc = chown(pathname, -1, grp_id); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1744:10: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. rc = chmod(pathname, mode); data/globus-gridftp-server-13.20/gfs_dynbe_client.c:88:5: [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. vfprintf(stderr, fmt, ap); data/globus-gridftp-server-13.20/gfs_gfork_master.c:176:5: [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. vfprintf(g_log_fptr, fmt, ap); data/globus-gridftp-server-13.20/globus_gridftp_server.c:36:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_gridftp_server.c:498:18: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. rc = execv(globus_l_gfs_child_argv[0], globus_l_gfs_child_argv); data/globus-gridftp-server-13.20/globus_gridftp_server.c:502:18: [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. rc = execvp(globus_l_gfs_child_argv[0], globus_l_gfs_child_argv); data/globus-gridftp-server-13.20/globus_gridftp_server.c:1577:18: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. rc = execv(globus_l_gfs_child_argv[0], globus_l_gfs_child_argv); data/globus-gridftp-server-13.20/globus_gridftp_server.c:1581:18: [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. rc = execvp(globus_l_gfs_child_argv[0], globus_l_gfs_child_argv); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:32:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:747:18: [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. rc = sscanf(p, "%s", optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:768:18: [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. rc = sscanf(p, "%s", valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:893:14: [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((rc = sscanf(p, "%s", optionbuf)) == 1) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:911:22: [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. rc = sscanf(p, "%s", valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:936:22: [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. rc = sscanf(p, "%s", valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:957:22: [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. rc = sscanf(p, "%s", valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1054:14: [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. rc = sscanf(p, "%s", optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1074:18: [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. rc = sscanf(p, "%s", valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2308:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(defval, "%s", o->int_value ? "TRUE" : "FALSE"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2318:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(defval, "%s", "not set"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2323:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(defval, "%s", data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2328:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(defval, "%s", "not set"); data/globus-gridftp-server-13.20/globus_i_gfs_control.c:31:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_i_gfs_control.c:383:41: [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. int access, data/globus-gridftp-server-13.20/globus_i_gfs_control.c:397:73: [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. result = globus_l_gfs_get_full_path(instance, chk_path, &real_path, access); data/globus-gridftp-server-13.20/globus_i_gfs_control.c:2394:16: [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. args = sscanf( data/globus-gridftp-server-13.20/globus_i_gfs_control.c:2512:16: [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. args = sscanf( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:37:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:512:41: [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. int access; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1203: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(*ret_string + (tmp_ptr - in_string), data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1625:62: [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_type & GFS_L_DIR && alias_ent->access & GFS_L_NONE) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1648:43: [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(alias_ent->access & access_type) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1663:39: [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(alias_ent->access & access_type) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1681:43: [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(alias_ent->access & access_type) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1736:25: [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(path + alias_ent->realpath_len, data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3103: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(a_tmp, a_ent->alias ? a_ent->alias : ""); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3104: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(b_tmp, b_ent->alias ? b_ent->alias : ""); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3301:54: [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. new_ent->access = alias_ent->access; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3415:26: [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. ent->access |= GFS_L_READ; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3421:26: [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. ent->access |= GFS_L_WRITE; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3427:26: [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. ent->access |= GFS_L_NONE; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3439:29: [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. ent->access |= GFS_L_READ | GFS_L_WRITE; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3454:14: [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. ent->access |= GFS_L_LIST; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3456:17: [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(ent->access & GFS_L_NONE) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3572:52: [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. new_ent->access = ent->access; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3744:18: [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. rc = sscanf(p, "%s", optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3765:18: [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. rc = sscanf(p, "%s", valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4727:18: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. rc = access(share_file, F_OK); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5676:20: [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(prog, R_OK | X_OK) < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6203:24: [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(share_file, F_OK) < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6217:24: [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(share_file, F_OK) < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6223:29: [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. access(op->session_handle->sharing_state_dir, F_OK) < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6357:24: [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(share_file, F_OK) < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6371:24: [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(share_file, F_OK) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6421:25: [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. access(op->session_handle->sharing_state_dir, F_OK) < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6445:24: [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(op->session_handle->sharing_state_dir, W_OK) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9185:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(newpath->pathname, "%s/%s", stat_info->pathname, stat_array[i].name); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:10468:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:233: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(repo_name, GFS_DB_REPO_NAME); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:39:23: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:633: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(filename, buf); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:651:17: [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(filename, filepart); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:657:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(basepath, buf); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:658:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, filepart); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1842:13: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(count, "%"GLOBUS_OFF_T_FORMAT, monitor->total_bytes); data/globus-gridftp-server-13.20/gfs_gfork_master.c:2223: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. g_be_cs = getenv(GFORK_CHILD_CS_ENV); data/globus-gridftp-server-13.20/gfs_gfork_master.c:2232: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. env_s = getenv(GFORK_CHILD_INSTANCE_ENV); data/globus-gridftp-server-13.20/globus_gridftp_server.c:36:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_gridftp_server.c:56:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. #define chroot(x) -1 data/globus-gridftp-server-13.20/globus_gridftp_server.c:663: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. (tmp = getenv("SSH_CLIENT")) != NULL) data/globus-gridftp-server-13.20/globus_gridftp_server.c:736: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. (tmp = getenv("SSH_CONNECTION")) != NULL) data/globus-gridftp-server-13.20/globus_gridftp_server.c:1728:5: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand(time(NULL) * (getpid() + 1)); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:32:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:53:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. #define chroot(x) -1 data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1249:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. value = getenv(option_list[i].env_var_option); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3067:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tmp_gl = getenv("GLOBUS_LOCATION"); data/globus-gridftp-server-13.20/globus_i_gfs_control.c:31:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_i_gfs_control.c:51:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. #define chroot(x) -1 data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1593:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if((freq = getenv("GFS_CKSM_MARKERS")) != NULL) data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1646:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tz = getenv("TZ"); data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1789:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tz = getenv("TZ"); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:37:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:59:9: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. #define chroot(x) -1 data/globus-gridftp-server-13.20/globus_i_gfs_data.c:510:41: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. char * realpath; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:820:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(getenv("HOMEDRIVE") && getenv("HOMEPATH")) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:820:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(getenv("HOMEDRIVE") && getenv("HOMEPATH")) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:823:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. "%s%s", getenv("HOMEDRIVE"), getenv("HOMEPATH")); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:823:42: [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. "%s%s", getenv("HOMEDRIVE"), getenv("HOMEPATH")); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:825: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. else if(getenv("USERPROFILE")) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:827:54: [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. home_dir = globus_common_create_string("%s", getenv("USERPROFILE")); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1733:35: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(alias_ent->realpath) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1735:50: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. strncpy(path, alias_ent->realpath, alias_ent->realpath_len); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3235:27: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(alias_ent->realpath && data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3236:29: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. (alias_ent->realpath[0] == '~' || strchr(alias_ent->realpath, '$'))) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3236:69: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. (alias_ent->realpath[0] == '~' || strchr(alias_ent->realpath, '$'))) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3239:48: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. session_handle, alias_ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3241:40: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. globus_free(alias_ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3243:61: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. alias_ent->realpath_len = strlen(alias_ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3246:43: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. for(var_path = alias_ent->realpath; *var_path != '\0'; var_path++) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3304:39: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(alias_ent->realpath) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3306:67: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. new_ent->realpath = strdup(alias_ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3471:47: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. globus_url_string_hex_decode(ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3472:45: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath_len = strlen(ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3486:19: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. (ent->realpath && strchr(GFS_RP_LEAD_CHARS, *ent->alias) == NULL)) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3489:21: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(ent->realpath) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3491:34: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. globus_free(ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3501:25: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(ent->realpath) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3503:38: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. globus_free(ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3547:25: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(ent->realpath) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3549:40: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. for(tmp_ptr = ent->realpath; *tmp_ptr != '\0'; tmp_ptr++) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3589:65: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. new_ent->realpath = globus_libc_strdup(ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3592:30: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(!ent->realpath && ent->alias[0] == '/' && data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3606:29: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(ent->realpath && ent->realpath[0] == '/' && data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3606:46: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(ent->realpath && ent->realpath[0] == '/' && data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3607:38: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. isalpha(ent->realpath[1])) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3609:30: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath[0] = ent->realpath[1]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3609:49: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath[0] = ent->realpath[1]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3610:30: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath[1] = ':'; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3611:33: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(ent->realpath[2] == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3613:65: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath = globus_realloc(ent->realpath, 4); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3614:34: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath[2] = '/'; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3615:34: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. ent->realpath[3] = '\0'; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4634:18: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. rc = chroot(chroot_dir); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12421:31: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if(op->writing && (freq = getenv("GFS_RETR_MARKERS")) != NULL) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:13757: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. tz = getenv("TZ"); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:39:9: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. #define realpath(x,y) strcpy(y,x) data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:682:8: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(realpath(in_path, resolved) == NULL) data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:820:31: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(stat_result < 0 || realpath(stat_info->pathname, symlink_target) == NULL) data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1074: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. (getenv("FTPNOSORT") ? NULL : alphasort)); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1171:43: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(stat_result < 0 || realpath(path, symlink_target) == NULL) data/globus-gridftp-server-13.20/gfs_dynbe_client.c:205: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(&buffer[GF_DYN_AT_ONCE_NDX], &tmp32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_dynbe_client.c:208: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(&buffer[GF_DYN_TOTAL_NDX], &tmp32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_dynbe_client.c:211: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(&buffer[GF_DYN_ENTRY_COUNT_NDX], &tmp32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:464: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_32, &buffer[GF_DYN_AT_ONCE_NDX], sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:466: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(&buffer[GF_DYN_AT_ONCE_NDX], &converted_32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:468: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_32, &buffer[GF_DYN_TOTAL_NDX], sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:470: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(&buffer[GF_DYN_TOTAL_NDX], &converted_32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:488: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(ent_buf->buffer, buffer, GF_DYN_PACKET_LEN); data/globus-gridftp-server-13.20/gfs_gfork_master.c:533: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(iov[0].iov_base, buffer, GF_DYN_PACKET_LEN); data/globus-gridftp-server-13.20/gfs_gfork_master.c:574: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 line[256]; data/globus-gridftp-server-13.20/gfs_gfork_master.c:633:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fptr = fopen(g_allowed_dn_file, "r"); data/globus-gridftp-server-13.20/gfs_gfork_master.c:902: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(&ent_buf->buffer[GF_DYN_ENTRY_COUNT_NDX],&n32,sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:1015: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(&buffer[GF_MEM_LIMIT_NDX], &n, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:1369:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tmp32, data/globus-gridftp-server-13.20/gfs_gfork_master.c:1568: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(&buffer[GF_DYN_AT_ONCE_NDX], &converted_32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:1570: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(&buffer[GF_DYN_TOTAL_NDX], &converted_32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/gfs_gfork_master.c:1988: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). g_log_fptr = fopen(opt[0], "w"); data/globus-gridftp-server-13.20/globus_gridftp_server.c:1554:29: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * fh = fopen(pidfile_evaled, "w"); data/globus-gridftp-server-13.20/globus_gridftp_server.c:1638:21: [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/globus-gridftp-server-13.20/globus_gridftp_server.c:1819: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 buf[256]; data/globus-gridftp-server-13.20/globus_i_gfs_acl.c:115: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(&auth_object, &acl_handle->auth_object, data/globus-gridftp-server-13.20/globus_i_gfs_acl.c:287: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(&acl_handle->auth_object, object, sizeof(globus_gfs_acl_object_desc_t)); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:604: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(option, &option_list[i], sizeof(globus_l_gfs_config_option_t)); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:665:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fptr = fopen(filename, "r"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:695:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char part_line[GLOBUS_L_GFS_LINEBUFLEN]; data/globus-gridftp-server-13.20/globus_i_gfs_config.c:806:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(option, &option_list[i], sizeof(globus_l_gfs_config_option_t)); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:915:42: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). globus_l_gfs_is_worker = atoi(valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:940:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). globus_l_gfs_num_threads = atoi(valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:984:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fptr = fopen(filename, "r"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1013:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char part_line[GLOBUS_L_GFS_LINEBUFLEN]; data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1094:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errstr[PATH_MAX]; data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1263: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(option, &option_list[i], sizeof(globus_l_gfs_config_option_t)); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1391:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1490: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(option, &option_list[i], sizeof(globus_l_gfs_config_option_t)); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1518:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen(filename, "r"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1676:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out = fopen(wsdl_file, "w"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1756:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). out = fopen(c_file, "w"); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2263:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linebuffer[GLOBUS_GFS_HELP_ROWS * GLOBUS_GFS_HELP_COLS]; data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2270:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char defval[255]; data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2314:25: [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(defval, "%d", o->int_value); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2466: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 ipaddr[256]; data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3045:40: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). globus_l_gfs_num_threads = atoi(tmp_argv[arg_num + 1]); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3143: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 nthreads[8]; data/globus-gridftp-server-13.20/globus_i_gfs_control.c:654:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char feat_str[6 + strlen(cksm_str)]; data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1312: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[1024]; data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1709:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char version_string[1024]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1317: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 path[MAXPATHLEN]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1379:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char workbuf[MAXPATHLEN]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1482: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 path[MAXPATHLEN]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:2694: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 buf[256]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:2830: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 ipaddr[100]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3036:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rc = atoi(tmp); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3097: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 a_tmp[a_ent->alias_len+1]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3098: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 b_tmp[b_ent->alias_len+1]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3587:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_ent, ent, sizeof(globus_l_gfs_alias_ent_t)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3661:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fptr = fopen(filename, "r"); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3693:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char part_line[GLOBUS_L_GFS_LINEBUFLEN]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4107: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 authz_usr[USER_NAME_MAX]; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4506:29: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE * pw = fopen(pw_file, "r"); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5190: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(str_transferred, "0 bytes"); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6248:29: [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). open(share_file, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6944: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(&handle->info, data_info, sizeof(globus_gfs_data_info_t)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6948: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(&handle->data_channel, &session_handle->udt_data_channel, data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9137:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&stat_temp, &stat_array[i], sizeof(globus_gfs_stat_t)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9138:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&stat_array[i], &stat_array[file_count-1], sizeof(globus_gfs_stat_t)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9139:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&stat_array[file_count-1], &stat_temp, sizeof(globus_gfs_stat_t)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9425: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(bounce_info->list_response, list_response, list_response_len); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:10445: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 * names[5] = data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12049: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( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12094:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12261: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( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12306:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12951:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&data_handle->info, op->info_struct, data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:203: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 repo_name[GF_DYN_REPO_LEN]; data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:204: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 cs[GF_DYN_CS_LEN]; data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:205: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 cookie[GF_DYN_COOKIE_LEN]; data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:213: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_32, &buffer[GF_DYN_AT_ONCE_NDX], sizeof(uint32_t)); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:216: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_32, &buffer[GF_DYN_TOTAL_NDX], sizeof(uint32_t)); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:223: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(cookie, &buffer[GF_DYN_COOKIE_NDX], GF_DYN_COOKIE_LEN); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:224: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(cs, &buffer[GF_DYN_CS_NDX], GF_DYN_CS_LEN); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:225: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(repo_name, &buffer[GF_DYN_REPO_NDX], GF_DYN_REPO_LEN); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:341: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(&buffer[GF_RELEASE_COUNT_NDX], &tmp32, sizeof(uint32_t)); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:394:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&n32, &buffer[GF_DYN_ENTRY_COUNT_NDX], sizeof(uint32_t)); data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:403:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&n32, data/globus-gridftp-server-13.20/globus_i_gfs_default_brain.c:435:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&n32, &buffer[GF_MEM_LIMIT_NDX], sizeof(uint32_t)); data/globus-gridftp-server-13.20/globus_i_gfs_ftp_response_error.c:492: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 msg[256]; data/globus-gridftp-server-13.20/globus_i_gfs_ipc.c:1366: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, gsi_buffer.value, gsi_buffer.length); data/globus-gridftp-server-13.20/globus_i_gfs_ipc.c:5689: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(ptr, user_buffer, buffer_len); data/globus-gridftp-server-13.20/globus_i_gfs_ipc.c:6307: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(ptr, gsi_buffer.value, gsi_buffer.length); data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:41: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, &_cw, 4); \ data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:54: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(&_cw, _buf, 4); \ data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:69: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(&_cw, _buf, 4); \ data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:92: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, &_w, 8); \ data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:104: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(&_w, _buf, 8); \ data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:130: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, &_cw, 8); \ data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:146: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(&_cw, _buf, 8); \ data/globus-gridftp-server-13.20/globus_i_gfs_log.c:108:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). log_mask = atoi(log_level); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:251:37: [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). globus_l_gfs_log_file = fopen(logfilename, "a"); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:320:42: [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). globus_l_gfs_transfer_log_file = fopen(logfilename, "a"); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:708: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 out_buf[4096]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:610: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[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:678: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 resolved[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:787: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 basepath[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:788: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 filename[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:789: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 symlink_target[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:855: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 dir_path[maxpathlen]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:949:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[maxpathlen]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:959:17: [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 winmsg[256]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:967:21: [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(winmsg, "An unknown error occurred in stat()."); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1060: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 dir_path[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1109:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1403: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 path[MAXPATHLEN]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1777: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. unsigned char md[MD5_DIGEST_LENGTH]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1778: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 md5sum[MD5_DIGEST_LENGTH * 2 + 1] = {0}; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1779: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. unsigned char sha[SHA512_DIGEST_LENGTH]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1780: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 shasum[SHA512_DIGEST_LENGTH * 2 + 1] = {0}; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1781: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 adler32_human[2*sizeof(uint32_t)+1]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1841:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char count[128]; data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1892:26: [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. md5ptr += sprintf(md5ptr, "%02x", md[i]); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1902:26: [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. shaptr += sprintf(shaptr, "%02x", sha[i]); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1912:26: [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. shaptr += sprintf(shaptr, "%02x", sha[i]); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:1922:26: [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. shaptr += sprintf(shaptr, "%02x", sha[i]); data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c:648: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(&finished_info, reply, sizeof(globus_gfs_finished_info_t)); data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c:783: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(&finished_info, reply, sizeof(globus_gfs_finished_info_t)); data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c:1224: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_transfer_info, transfer_info, data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c:1315: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_transfer_info,transfer_info, data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c:1399: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(new_transfer_info, data/globus-gridftp-server-13.20/modules/remote/globus_gridftp_server_remote.c:1479: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/globus-gridftp-server-13.20/test/ipc-test.c:109: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 test_chars_out[6]; data/globus-gridftp-server-13.20/test/ipc-test.c:145: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 *test_strings_out[3]; data/globus-gridftp-server-13.20/test/sharing_allowed_test.c:36: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 * argv[9] = {"globus-gridftp-server"}; data/globus-gridftp-server-13.20/gfs_dynbe_client.c:213:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *) &buffer[GF_DYN_CS_NDX], be_cs, GF_DYN_CS_LEN); data/globus-gridftp-server-13.20/gfs_gfork_master.c:1052:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)&buffer[GF_KILL_STRING_NDX], msg, GF_KILL_STRING_LEN); data/globus-gridftp-server-13.20/gfs_gfork_master.c:1571:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)&buffer[GF_DYN_CS_NDX], g_be_cs, GF_DYN_CS_LEN); data/globus-gridftp-server-13.20/globus_gridftp_server.c:956: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(sorry_msg); data/globus-gridftp-server-13.20/globus_gridftp_server.c:1553:27: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(022); data/globus-gridftp-server-13.20/globus_gridftp_server.c:1555:17: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldmask); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:693:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while(p && linebuf[strlen(linebuf) - 1] != '\n') data/globus-gridftp-server-13.20/globus_i_gfs_config.c:706:17: [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(linebuf, part_line, linebuflen); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:753: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). optlen += strlen(optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:774: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). optlen += strlen(valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:899: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). p = p + strlen(optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:924: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). p = p + strlen(optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:945: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). p = p + strlen(optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1011:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while(p && linebuf[strlen(linebuf) - 1] != '\n') data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1024:17: [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(linebuf, part_line, linebuflen); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1059: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). optlen += strlen(optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1080: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). optlen += strlen(valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:1343:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(argp); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2011:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t hyphens = strlen(o->configfile_option); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2196: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(in_str); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2277:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(o->configfile_option) + 4); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2352: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). len = strlen(linebuffer); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2884: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). buf.length = strlen(ipc_dn); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:2928: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). buf.length = strlen(buf.value); data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3484: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). if(strncmp(addr, remote_addr, strlen(addr)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3492: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). if(strncmp(addr, remote_addr, strlen(addr)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3505: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). if(strncmp(addr, remote_addr, strlen(addr)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3513: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). if(strncmp(addr, remote_addr, strlen(addr)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_config.c:3555: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 = strlen(alias); data/globus-gridftp-server-13.20/globus_i_gfs_control.c:654: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). char feat_str[6 + strlen(cksm_str)]; data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1627: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). if (strlen(cmd_array[1]) < 14) data/globus-gridftp-server-13.20/globus_i_gfs_control.c:1770:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(cmd_array[2]) < 14) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:212:42: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). globus_gridftp_server_read_cb_t read; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:677:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(body && (body_len = strlen((char *) body)) > 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:685: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). b64_header = malloc(strlen(header_str) * 4 / 3 + 4); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:687: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). (globus_byte_t *) header_str, strlen(header_str), data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1200: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(in_string) + strlen(session_handle->chroot_path)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1200:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(in_string) + strlen(session_handle->chroot_path)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1202:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*ret_string, in_string, tmp_ptr - in_string); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1204: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). tmp_ptr + strlen((session_handle->chroot_path))); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1231:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). out_path = globus_malloc(strlen(path) + 4); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1242: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). end = path + strlen(path); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1292:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(out_ptr, in_ptr, len); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1345: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(strcspn(in_path, WIN_CHARS_NOT_ALLOWED) != strlen(in_path)) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1356:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, in_path, sizeof(path)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1410: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). cwd_len = strlen(cwd); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1426: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). cwd_len = strlen(cwd); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1538:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, start_path, sizeof(path)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1541:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_len = strlen(path); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1616:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). in_path_len = strlen(check_path); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:1735:25: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(path, alias_ent->realpath, alias_ent->realpath_len); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:2201: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). keylen = strlen(key); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:2230:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp_val, valstart, valend - valstart); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:2274: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). keylen = strlen(key); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3223: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). alias_ent->alias_len = strlen(alias_ent->alias); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3243: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). alias_ent->realpath_len = strlen(alias_ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3303: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). new_ent->alias_len = strlen(real_path); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3360: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). strlen(session_handle->chroot_path)) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3366: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). (char *) malloc(2 * strlen(session_handle->chroot_path) + 1); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3468:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ent->alias_len = strlen(ent->alias); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3472: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). ent->realpath_len = strlen(ent->realpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3478:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ent->alias_len = strlen(ent->alias); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3517: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). ent->alias_len = strlen(ent->alias); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3527: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). ent->alias_len = strlen(ent->alias); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3573:50: [1] (buffer) strlen: Does not handle 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_ent->alias_len = strlen("_:/"); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3691:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while(p && linebuf[strlen(linebuf) - 1] != '\n') data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3705:17: [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(linebuf, part_line, linebuflen); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3750: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). optlen += strlen(optionbuf); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3771: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). optlen += strlen(valuebuf); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3934: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). if(strncmp(match_user, user, strlen(match_user)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3943: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(match_user, user, strlen(match_user)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3957: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). if(strncmp(match_user, user, strlen(match_user)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:3966: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(match_user, user, strlen(match_user)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4146: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). strlen(GLOBUS_SHARING_PREFIX)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4157: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). session_info->username + strlen(GLOBUS_SHARING_PREFIX); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4192: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). desired_user_cert = malloc(strlen(crt_tmp + 1)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:4249: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). strlen(GLOBUS_SHARING_PREFIX)) == 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5664:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = strlen(alias); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5668:55: [1] (buffer) strlen: Does not handle 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(alias, ptr, size) == 0 && strlen(ptr) == size) || data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5930:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dcsc_len = strlen(cmd_info->pathname); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5943: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). buf.length = strlen(buf.value); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:5990: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). ca_pem = malloc(strlen((char *) tmp_val)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6276:64: [1] (buffer) strlen: Does not handle 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 = write(sharingfd, tmp_content, strlen(tmp_content)); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6658: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). tmp = globus_malloc(strlen(cmd_info->pathname) + 1); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6662:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). starttag += strlen("appname=");; data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6687:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). starttag += strlen("appver="); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:6713:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). starttag += strlen("scheme="); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9105: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). int plen = strlen(op->current_path->subpath); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9106: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). int nlen = strlen(stat_array[0].name); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9149: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). dirlen = strlen(stat_info->pathname); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9151: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). (strlen(op->current_path->pathname) - strlen(op->current_path->subpath)) : data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9151: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). (strlen(op->current_path->pathname) - strlen(op->current_path->subpath)) : data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9184:72: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). newpath->pathname = (char *)globus_malloc(dirlen + strlen(stat_array[i].name) + 2); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9219: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). int newpathlen = strlen(newpath->pathname); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9228:44: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int ipathlen = strlen(iter->pathname); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:9597: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). len = strlen(stat_info->pathname); data/globus-gridftp-server-13.20/globus_i_gfs_data.c:11020:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bounce_info->callback.read( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12076: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(base_path[strlen(base_path) - 1] != '/') data/globus-gridftp-server-13.20/globus_i_gfs_data.c:12288: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(base_path[strlen(base_path) - 1] != '/') data/globus-gridftp-server-13.20/globus_i_gfs_data.c:14249:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). bounce_info->callback.read( data/globus-gridftp-server-13.20/globus_i_gfs_data.c:14469:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(rc < 1 || strlen(tmp_val) != tmp_consume || tmp_off < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:14483:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(rc < 1 || strlen(tmp_val) != tmp_consume || tmp_len < 0) data/globus-gridftp-server-13.20/globus_i_gfs_data.c:14712: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). d_req = malloc(strlen(request)); data/globus-gridftp-server-13.20/globus_i_gfs_embed.c:110: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). strlen(sorry_msg), data/globus-gridftp-server-13.20/globus_i_gfs_embed.c:111: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). strlen(sorry_msg), data/globus-gridftp-server-13.20/globus_i_gfs_ipc.c:2574: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). send_tok.length = strlen(auth_mode_str + 8) + 1; data/globus-gridftp-server-13.20/globus_i_gfs_ipc.h:194: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). GFSEncodeUInt32(_start, _len, _buf, strlen(_str)+1); \ data/globus-gridftp-server-13.20/globus_i_gfs_log.c:102:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(log_level); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:139:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). end = module_str + strlen(module_str); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:250:23: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(022); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:252:13: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldmask); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:319:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). oldmask = umask(022); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:321:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(oldmask); data/globus-gridftp-server-13.20/globus_i_gfs_log.c:801:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fwrite(out_buf, 1, strlen(out_buf), globus_l_gfs_transfer_log_file); data/globus-gridftp-server-13.20/modules/file/globus_gridftp_server_file.c:615:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, pathname, MAXPATHLEN); data/globus-gridftp-server-13.20/test/cmp_alias_ent_test.c:129: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). slen = strlen(s); data/globus-gridftp-server-13.20/test/cmp_alias_ent_test.c:143: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). slen = strlen(s); data/globus-gridftp-server-13.20/test/error_response_test.c:64: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). ok = (m != NULL) && (strncmp(m, expect, strlen(expect)) == 0); data/globus-gridftp-server-13.20/test/error_response_test.c:254: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). p += strlen(p); ANALYSIS SUMMARY: Hits = 395 Lines analyzed = 49774 in approximately 0.88 seconds (56343 lines/second) Physical Source Lines of Code (SLOC) = 41639 Hits@level = [0] 227 [1] 119 [2] 131 [3] 65 [4] 63 [5] 17 Hits@level+ = [0+] 622 [1+] 395 [2+] 276 [3+] 145 [4+] 80 [5+] 17 Hits/KSLOC@level+ = [0+] 14.9379 [1+] 9.4863 [2+] 6.6284 [3+] 3.48231 [4+] 1.92128 [5+] 0.408271 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.