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-gass-copy-10.5/globus_i_gass_copy.h Examining data/globus-gass-copy-10.5/globus_gass_copy_glob.c Examining data/globus-gass-copy-10.5/globus_gass_copy.h Examining data/globus-gass-copy-10.5/globus_url_copy.c Examining data/globus-gass-copy-10.5/globus_url_copy.h Examining data/globus-gass-copy-10.5/globus_gass_copy.c FINAL RESULTS: data/globus-gass-copy-10.5/globus_gass_copy.c:5467:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(src_msg, " %s, GLOBUS_GASS_COPY_URL_MODE_UNSUPPORTED.", data/globus-gass-copy-10.5/globus_gass_copy.c:5477:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(dest_msg, " %s, GLOBUS_GASS_COPY_URL_MODE_UNSUPPORTED.", data/globus-gass-copy-10.5/globus_gass_copy_glob.c:469:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1079: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. rc = sscanf(size_s, "%"GLOBUS_OFF_T_FORMAT, &size); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1287:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1325: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. If the scanf format is influenceable by an attacker, it's exploitable. rc = sscanf(size_s, "%"GLOBUS_OFF_T_FORMAT, &size); data/globus-gass-copy-10.5/globus_url_copy.c:1531:20: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). dumptmp2 = mktemp(dumptmp); data/globus-gass-copy-10.5/globus_url_copy.c:1645:20: [4] (tmpfile) mktemp: Temporary file race condition (CWE-377). dumptmp2 = mktemp(dumptmp); data/globus-gass-copy-10.5/globus_url_copy.c:2016:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("\nerror: %s"), g_err_msg); data/globus-gass-copy-10.5/globus_url_copy.c:2124:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("\ncontinuing on error: %s\n"), msg); data/globus-gass-copy-10.5/globus_url_copy.c:2465: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", src_url); data/globus-gass-copy-10.5/globus_url_copy.c:2489: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", dst_url); data/globus-gass-copy-10.5/globus_url_copy.c:2506: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. rc = sscanf(p, "%"GLOBUS_OFF_T_FORMAT",%"GLOBUS_OFF_T_FORMAT, data/globus-gass-copy-10.5/globus_url_copy.c:2551:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Problem parsing url list: line %d\n"), line_num); data/globus-gass-copy-10.5/globus_url_copy.c:2602: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", buf); data/globus-gass-copy-10.5/globus_url_copy.c:2614: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", buf); data/globus-gass-copy-10.5/globus_url_copy.c:3068:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("\nerror transferring:\n%s"), data/globus-gass-copy-10.5/globus_url_copy.c:3206:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init ftp handle attr %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:3218:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to set rfc1738 support %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:4001:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/globus-gass-copy-10.5/globus_url_copy.c:4012:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/globus-gass-copy-10.5/globus_url_copy.c:4023:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/globus-gass-copy-10.5/globus_url_copy.c:5327:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(matched_dest_url, "%s%s", dst_url, matched_file); data/globus-gass-copy-10.5/globus_url_copy.c:5566:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init ftp handle attr %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5623:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/globus-gass-copy-10.5/globus_url_copy.c:5633:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/globus-gass-copy-10.5/globus_url_copy.c:5649:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init debug plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5660:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to register debug plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5684:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init debug plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5696:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init debug plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5708:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to register restart plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5723:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init debug plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5733:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to init debug plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5744:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to register restart plugin %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5757:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to set rfc1738 support %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5768:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to enable gridftp2 support %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5782:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, _GASCSL("Error: Unable to enable pipeline %s\n"), data/globus-gass-copy-10.5/globus_url_copy.c:5824:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/globus-gass-copy-10.5/globus_url_copy.c:6112:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_stack, "%s", tmp_net_str); data/globus-gass-copy-10.5/globus_url_copy.c:6113:21: [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(tmp_stack + (second_driver - tmp_net_str)+1, data/globus-gass-copy-10.5/globus_url_copy.c:6115:21: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(tmp_stack, second_driver); data/globus-gass-copy-10.5/globus_url_copy.c:6119:21: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(tmp_stack, "%s,%s", tmp_net_str, gsi_driver_str); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:436:16: [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(path, symlink_target) == NULL) data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1658:12: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. if(realpath(parsed_url.url_path, symlink_target) == NULL) data/globus-gass-copy-10.5/globus_gass_copy.c:1736:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char * data/globus-gass-copy-10.5/globus_gass_copy.c:5459:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char src_msg[256]; data/globus-gass-copy-10.5/globus_gass_copy.c:5460:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dest_msg[256]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:300: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 unique_id[256]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:303: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 matched_url[MAXPATHLEN*2]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:306: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*2]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:382: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 path[MAXPATHLEN]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:461: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( data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1121: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 matched_url[4096]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1418: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-gass-copy-10.5/globus_gass_copy_glob.c:1486: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-gass-copy-10.5/globus_gass_copy_glob.c:1596: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 unique_id[256]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1598: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*2]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1682:5: [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( data/globus-gass-copy-10.5/globus_gass_copy_glob.c:2050: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_value[EVP_MAX_MD_SIZE]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:2051: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 cksm_buff[CKSM_SIZE]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:2054: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[GASS_COPY_CKSM_BUFSIZE]; data/globus-gass-copy-10.5/globus_gass_copy_glob.c:2099:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(parsed_url.url_path, O_RDONLY); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:2173:8: [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(cksmptr, "%02x", md_value[i]); data/globus-gass-copy-10.5/globus_url_copy.c:303: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 * hostname[1]; data/globus-gass-copy-10.5/globus_url_copy.c:1532:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dumpfd = open(dumptmp2, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); data/globus-gass-copy-10.5/globus_url_copy.c:1534:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). dumpfd = mkstemp(dumptmp); data/globus-gass-copy-10.5/globus_url_copy.c:1646:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dumpfd = open(dumptmp2, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); data/globus-gass-copy-10.5/globus_url_copy.c:1648:18: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). dumpfd = mkstemp(dumptmp); data/globus-gass-copy-10.5/globus_url_copy.c:2417: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[1024]; data/globus-gass-copy-10.5/globus_url_copy.c:2418: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 src_url[512]; data/globus-gass-copy-10.5/globus_url_copy.c:2419: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 dst_url[512]; data/globus-gass-copy-10.5/globus_url_copy.c:2430:35: [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 = (stdin_used) ? stdin : fopen(file_name, "r"); data/globus-gass-copy-10.5/globus_url_copy.c:2562: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[1024]; data/globus-gass-copy-10.5/globus_url_copy.c:2563: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[256]; data/globus-gass-copy-10.5/globus_url_copy.c:2579: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(file_name, "r"); data/globus-gass-copy-10.5/globus_url_copy.c:3146:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "r"); data/globus-gass-copy-10.5/globus_url_copy.c:3303: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 url_line[512]; data/globus-gass-copy-10.5/globus_url_copy.c:3308: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(fname, "r"); data/globus-gass-copy-10.5/globus_url_copy.c:3860:37: [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). guc_info->num_streams = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:3867:30: [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). guc_info->conc = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:3888:41: [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). guc_info->restart_retries = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:3891: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). guc_info->restart_interval = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:3894:41: [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). guc_info->restart_timeout = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:3897:39: [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). guc_info->stall_timeout = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:4089:28: [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). guc_info->pipelineq = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:4095:29: [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). guc_info->sync_level = atoi(instance->values[0]); data/globus-gass-copy-10.5/globus_url_copy.c:5509: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 idstr[16]; data/globus-gass-copy-10.5/globus_url_copy.c:5511:13: [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(idstr, "%u", handle->pipeline_id++); data/globus-gass-copy-10.5/globus_url_copy.c:5776: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 idstr[16]; data/globus-gass-copy-10.5/globus_url_copy.c:5777: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(idstr, "%02d", id); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:179: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). url_len = strlen(info->url); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:185: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). path_len = strlen(path); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:326: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). info->base_url_len = strlen(info->base_url); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:546: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). info->base_url_len = strlen(info->base_url); data/globus-gass-copy-10.5/globus_gass_copy_glob.c:1490: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-gass-copy-10.5/globus_gass_copy_glob.c:2154:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while((n = read(fd, buf, count)) > 0) data/globus-gass-copy-10.5/globus_gass_copy_glob.c:2179:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(cksm, cksm_buff, sizeof(cksm_buff)); data/globus-gass-copy-10.5/globus_url_copy.c:1099: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). end_ndx = strlen(url_info.url_path) - 1; data/globus-gass-copy-10.5/globus_url_copy.c:1674: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). url_pair->src_url[strlen(url_pair->src_url) - 1] == '/' ? data/globus-gass-copy-10.5/globus_url_copy.c:2473: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). url_len += strlen(src_url); data/globus-gass-copy-10.5/globus_url_copy.c:2497: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). url_len += strlen(dst_url); data/globus-gass-copy-10.5/globus_url_copy.c:2764: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). if(dst_url[strlen(dst_url) - 1] == '/') data/globus-gass-copy-10.5/globus_url_copy.c:3542: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(buf.value); data/globus-gass-copy-10.5/globus_url_copy.c:4962:41: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. globus_bool_t * mismatch) data/globus-gass-copy-10.5/globus_url_copy.c:5172: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). url_len = strlen(dst_url); data/globus-gass-copy-10.5/globus_url_copy.c:5297:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(matched_src_urlinfo->url[strlen(matched_src_urlinfo->url) - 1] == '/') data/globus-gass-copy-10.5/globus_url_copy.c:5325: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). (url_len + strlen(matched_file) + 1) * sizeof(char)); data/globus-gass-copy-10.5/globus_url_copy.c:5494: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(pair->dst_url[strlen(pair->dst_url) - 1] == '/') data/globus-gass-copy-10.5/globus_url_copy.c:6101: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(gsi_ptr) != 4))) data/globus-gass-copy-10.5/globus_url_copy.c:6103:36: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tmp_stack = malloc(strlen(tmp_net_str) + 5); ANALYSIS SUMMARY: Hits = 110 Lines analyzed = 16817 in approximately 0.35 seconds (48038 lines/second) Physical Source Lines of Code (SLOC) = 12977 Hits@level = [0] 46 [1] 20 [2] 46 [3] 2 [4] 42 [5] 0 Hits@level+ = [0+] 156 [1+] 110 [2+] 90 [3+] 44 [4+] 42 [5+] 0 Hits/KSLOC@level+ = [0+] 12.0213 [1+] 8.47654 [2+] 6.93535 [3+] 3.39061 [4+] 3.2365 [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.