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-control-9.0/globus_gridftp_server_control_attr.c Examining data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c Examining data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c Examining data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_accessors.c Examining data/globus-gridftp-server-control-9.0/globus_i_gridftp_server_control.h Examining data/globus-gridftp-server-control-9.0/test/globus_xio_ftp_server.c Examining data/globus-gridftp-server-control-9.0/test/globus_gs_simple_test.c Examining data/globus-gridftp-server-control-9.0/test/globus_ftp_telnet_client.c Examining data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.h Examining data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_events.c Examining data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.h Examining data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c FINAL RESULTS: data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4170:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, "UNIX.owner=%s;", enc_str); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4188:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, "UNIX.group=%s;", enc_str); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4211:25: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4232:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, "X.abspath=%s%s;", enc_str, slash); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4273:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, " %s", base_path); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4277:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, " %s/%s", base_path, stat_info->name); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4282:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_ptr, " %s", stat_info->name); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:91:10: [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. sc = sscanf(cmd_a[1], "%"GLOBUS_OFF_T_FORMAT, &size); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:1834: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 the scanf format is influenceable by an attacker, it's exploitable. sc = sscanf(cmd_a[1], "%"GLOBUS_OFF_T_FORMAT, &end_offset); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:1850: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. If the scanf format is influenceable by an attacker, it's exploitable. sc = sscanf(tmp_ptr, data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:3012: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. If the scanf format is influenceable by an attacker, it's exploitable. sc = sscanf(arg2, data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:3046: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. If the scanf format is influenceable by an attacker, it's exploitable. sc = sscanf(arg2, "%"GLOBUS_OFF_T_FORMAT, &tmp_o); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:807: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(reply, REPLY_235_ADAT_DATA); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:836: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(reply, REPLY_335_ADAT_DATA); data/globus-gridftp-server-control-9.0/test/globus_gs_simple_test.c:156: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(stat_info.name, path); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:344: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. if((e = getenv("GFS_MAX_READ_QUEUE")) != NULL) data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1386:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. && getenv("X509_VHOST_CRED_DIR") == NULL) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:40:42: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. #define GLOBUS_L_SITE_TEST_SUITE_MSG ((char *) globus_l_test_msg) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.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 buffer[GSU_MAX_PW_LENGTH]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:346:35: [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_gsc_max_read_q = atoi(e); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:492: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(op->command, command, len); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2150: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). (unsigned) atoi(contact_info.port) > 65535) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2183: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(dst, src, sizeof(globus_gridftp_server_control_stat_t)); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3028:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(server_handle->opts.mlsx_fact_str, "TMSPUOIGDQLAN"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3557: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 cmd_name[5]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3780: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[MAXPATHLEN * 3]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3878: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 name[GSU_MAX_USERNAME_LENGTH]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3950: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(tmp_ptr, stat_info[ctr].name, tmp_i); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4007: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(tmp_ptr, "Type=file;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4019: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(tmp_ptr, "Type=pdir;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4023: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(tmp_ptr, "Type=cdir;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4028: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(tmp_ptr, "Type=dir;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4033: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(tmp_ptr, "Type=slink;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4037: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(tmp_ptr, "Type=OS.unix=chr;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4041: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(tmp_ptr, "Type=OS.unix=blk;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4045: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(tmp_ptr, "Type=OS.unix=pipe;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4049: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(tmp_ptr, "Type=OS.unix=other;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4055:17: [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(tmp_ptr, "Modify=%04d%02d%02d%02d%02d%02d;", data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4061:17: [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(tmp_ptr, "Charset=UTF-8;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4065:17: [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(tmp_ptr, data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4070:17: [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(tmp_ptr, "Perm="); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4148:17: [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(tmp_ptr, "UNIX.mode=%04o;", data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4153:17: [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(tmp_ptr, "UNIX.uid=%d;", stat_info->uid); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4157:17: [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(tmp_ptr, "UNIX.gid=%d;", stat_info->gid); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4197:17: [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(tmp_ptr, "Unique=%lx-%lx;", data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4243: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(tmp_ptr, "X.count=%u;", stat_info->nlink); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4259:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(tmp_ptr, "Error=OpenFailed;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4263:13: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(tmp_ptr, "Error=InvalidLink;"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4343: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(tmp_ptr, line, tmp_i); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4364: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 username[GSU_MAX_USERNAME_LENGTH]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4365: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 grpname[GSU_MAX_USERNAME_LENGTH]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4369: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 perms[11]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4371: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 * month_lookup[12] = data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4378:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(perms, "----------"); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4528: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(tmp_ptr, line, tmp_i); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:5422: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-control-9.0/globus_gridftp_server_control_commands.c:2534: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 buf[100]; data/globus-gridftp-server-control-9.0/globus_i_gridftp_server_control.h:221: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 mlsx_fact_str[16]; data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:819: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(&reply[strlen(REPLY_235_ADAT_DATA)+length], "\r\n\0", 3); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:849: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(&reply[strlen(REPLY_335_ADAT_DATA)+length], "\r\n\0", 3); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1071: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, unwrapped_token.value, unwrapped_token.length); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1155: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(encoded_buf, "MIC ", 4); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1159: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(encoded_buf, "ENC ", 4); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1166: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(encoded_buf, "631 ", 4); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1170: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(encoded_buf, "632 ", 4); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1962: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(radix_buf, "ADAT ", 5); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:2335: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(dst_attr, src_attr, sizeof(globus_l_xio_gssapi_attr_t)); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:2777: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(&out_buffer[ndx], send_buffer, tmp_i); data/globus-gridftp-server-control-9.0/test/globus_ftp_telnet_client.c:52: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[LINE_LEN]; data/globus-gridftp-server-control-9.0/test/globus_xio_ftp_server.c:49: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[LINE_LEN]; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:1392: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(msg), data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:1393: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(msg), data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:1863:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). command_len = strlen(command); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:1916: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). cmd_a[argc_ndx] = globus_malloc(strlen(start_ptr)); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2051: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). memmove(tmp_ptr, &tmp_ptr[1], strlen(&tmp_ptr[1])+1); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2067: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). memmove(tmp_ptr2, &tmp_ptr[3], strlen(&tmp_ptr[3])+1); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2075: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). memmove(tmp_ptr, &tmp_ptr[2], strlen(&tmp_ptr[2])+1); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2080: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(tmp_path); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2464: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(tmp_ptr); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:2518: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(tmp_ptr); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3384: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). if(strncmp("SITE ", command_name, 5) == 0 && strlen(command_name) > 5) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3438: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). if(strncmp("SITE ", cmd_name, 5) == 0 && strlen(cmd_name) > 5) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3788: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_string); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3894:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, gr->gr_name, GSU_MAX_USERNAME_LENGTH); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:3938:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_i = strlen(stat_info[ctr].name); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4227:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(absolute_path[strlen(absolute_path) - 1] == '/') data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4251: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). tmp_ptr += strlen(tmp_ptr); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4260: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). tmp_ptr += strlen(tmp_ptr); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4264: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). tmp_ptr += strlen(tmp_ptr); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4311:63: [1] (buffer) strlen: Does not handle 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_len = stat_count * sizeof(char) * (256 + (base_path ? strlen(base_path) : 0)) + 1; data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4326: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). tmp_i = strlen(line); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:4516: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). tmp_i = strlen(line); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control.c:5874: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). *out_size = strlen((char *) *out_buf); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:133:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(strlen(cmd_a[1]) > 10 || data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:134:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(cmd_a[1]) == 10 && strcmp(cmd_a[1], "4294967296") >= 0)) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:1333: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). for(ctr = 0; ctr < strlen(arg); ctr++) data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:1801: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(op->server_handle->fault_cmd); data/globus-gridftp-server-control-9.0/globus_gridftp_server_control_commands.c:3153:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(tmp_ptr); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:812: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). (globus_byte_t *) &reply[strlen(REPLY_235_ADAT_DATA)], data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:819: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). memcpy(&reply[strlen(REPLY_235_ADAT_DATA)+length], "\r\n\0", 3); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:841: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). (globus_byte_t *) &reply[strlen(REPLY_335_ADAT_DATA)], data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:849:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy(&reply[strlen(REPLY_335_ADAT_DATA)+length], "\r\n\0", 3); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1464: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(cmd_a[1]), data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1471:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). handle->read_iov[0].iov_len = strlen(out_buf); data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1864: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(contact_string) + 1; data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:1870: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(handle->subject) + 1; data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:2768: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). strlen(cmd_a[ctr]), data/globus-gridftp-server-control-9.0/globus_xio_gssapi_ftp.c:2774: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). tmp_i = strlen(send_buffer); data/globus-gridftp-server-control-9.0/test/globus_ftp_telnet_client.c:112: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(line); data/globus-gridftp-server-control-9.0/test/globus_gs_simple_test.c:51:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(tm_str); data/globus-gridftp-server-control-9.0/test/globus_xio_ftp_server.c:75:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). res = globus_xio_write(xio_handle, "220 hello\r\n", strlen("220 hello\r\n"), data/globus-gridftp-server-control-9.0/test/globus_xio_ftp_server.c:76: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("220 hello\r\n"), &nbytes, NULL); ANALYSIS SUMMARY: Hits = 112 Lines analyzed = 16614 in approximately 0.29 seconds (57594 lines/second) Physical Source Lines of Code (SLOC) = 13477 Hits@level = [0] 46 [1] 42 [2] 53 [3] 2 [4] 15 [5] 0 Hits@level+ = [0+] 158 [1+] 112 [2+] 70 [3+] 17 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 11.7237 [1+] 8.31045 [2+] 5.19403 [3+] 1.26141 [4+] 1.11301 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.