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-cache-10.1/globus_gass_cache_config.c
Examining data/globus-gass-cache-10.1/globus_i_gass_cache.h
Examining data/globus-gass-cache-10.1/globus_gass_cache.c
Examining data/globus-gass-cache-10.1/globus_i_gass_cache_config.h
Examining data/globus-gass-cache-10.1/globus_gass_cache.h

FINAL RESULTS:

data/globus-gass-cache-10.1/globus_gass_cache.c:517: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(f, str, args);
data/globus-gass-cache-10.1/globus_gass_cache.c:600: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(fp, format, args);
data/globus-gass-cache-10.1/globus_gass_cache.c:643:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(dir, "%s/dir-%ld-%ld",
data/globus-gass-cache-10.1/globus_gass_cache.c:648:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(file, "%s/file", dir );
data/globus-gass-cache-10.1/globus_gass_cache.c:649:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(link1, "%s/link", dir );
data/globus-gass-cache-10.1/globus_gass_cache.c:651:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(link2, "%s/link-%ld-%ld",
data/globus-gass-cache-10.1/globus_gass_cache.c:1023: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( mptr, option->prefix );
data/globus-gass-cache-10.1/globus_gass_cache.c:1092: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( *path, root );
data/globus-gass-cache-10.1/globus_gass_cache.c:1095:9:  [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( *path, separator );
data/globus-gass-cache-10.1/globus_gass_cache.c:1096:9:  [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( *path, mangled_tag );
data/globus-gass-cache-10.1/globus_gass_cache.c:1100:9:  [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( *path, separator );
data/globus-gass-cache-10.1/globus_gass_cache.c:1101:9:  [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( *path, mangled_url );
data/globus-gass-cache-10.1/globus_gass_cache.c:1128:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(uniq_string,
data/globus-gass-cache-10.1/globus_gass_cache.c:1654:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf( data_name, "%s/%s", g, DATA_FILE );
data/globus-gass-cache-10.1/globus_gass_cache.c:1658:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf( uniq_name, "%s/%s%s", g, UDATA_FILE, u );
data/globus-gass-cache-10.1/globus_gass_cache.c:4479: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( name_path, search_dir );
data/globus-gass-cache-10.1/globus_gass_cache.c:4480:9:  [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( name_path, separator );
data/globus-gass-cache-10.1/globus_gass_cache.c:4481:9:  [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( name_path, name );
data/globus-gass-cache-10.1/globus_gass_cache.c:4509: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( new_mangled, base_mangled );
data/globus-gass-cache-10.1/globus_gass_cache.c:4514:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat( new_mangled, name );
data/globus-gass-cache-10.1/globus_gass_cache.c:4782: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( cache_handle->cache_directory_path, pt );
data/globus-gass-cache-10.1/globus_gass_cache.c:4783:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat( cache_handle->cache_directory_path,
data/globus-gass-cache-10.1/globus_gass_cache.c:4785:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(cache_handle->cache_directory_path,
data/globus-gass-cache-10.1/globus_gass_cache.c:4874: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(f_name,cache_handle->cache_directory_path);
data/globus-gass-cache-10.1/globus_gass_cache.c:4875:5:  [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(f_name,GLOBUS_L_GASS_CACHE_CONFIG_FILE);
data/globus-gass-cache-10.1/globus_gass_cache.c:4997: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( log_f_name, cache_handle->cache_directory_path );
data/globus-gass-cache-10.1/globus_gass_cache.c:4998:9:  [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( log_f_name, separator );
data/globus-gass-cache-10.1/globus_gass_cache.c:4999:9:  [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( log_f_name, GLOBUS_L_GASS_CACHE_LOG_DIR );
data/globus-gass-cache-10.1/globus_gass_cache.c:5008:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf( tmp, "%s%05d", separator, getpid() );
data/globus-gass-cache-10.1/globus_gass_cache.c:5009:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat( log_f_name, tmp );
data/globus-gass-cache-10.1/globus_gass_cache.c:5498:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
        sprintf( buf, "%s: %d attempts; %.5fs",
data/globus-gass-cache-10.1/globus_gass_cache.c:6082:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                    sprintf(buff,"MURL=\"%s\"", url_elem->mangled);
data/globus-gass-cache-10.1/globus_gass_cache.c:77:9:  [3] (random) srandom:
  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.
#define srandom(seed) srand(seed)
data/globus-gass-cache-10.1/globus_gass_cache.c:77:23:  [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.
#define srandom(seed) srand(seed)
data/globus-gass-cache-10.1/globus_gass_cache.c:78:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define random() rand()
data/globus-gass-cache-10.1/globus_gass_cache.c:565:24:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        char    *env = getenv( GLOBUS_L_GASS_CACHE_DEBUG );
data/globus-gass-cache-10.1/globus_gass_cache.c:3689:32:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    usec = LOCK_SLEEP_USEC + ( random() % LOCK_SLEEP_USEC );
data/globus-gass-cache-10.1/globus_gass_cache.c:4710:9:  [3] (random) srandom:
  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.
        srandom( tv.tv_usec );
data/globus-gass-cache-10.1/globus_gass_cache.c:4729: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.
        pt = getenv(GLOBUS_L_GASS_CACHE_DEFAULT_DIR_ENV_VAR);
data/globus-gass-cache-10.1/globus_gass_cache.c:401: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        msgbuf[CACHE_ERROR_MSGSIZE + 1];
data/globus-gass-cache-10.1/globus_gass_cache.c:490: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 hname[MAXHOSTNAMELEN];
data/globus-gass-cache-10.1/globus_gass_cache.c:491: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 time_buff[26];
data/globus-gass-cache-10.1/globus_gass_cache.c:583: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).
                fp = fopen( env, "a+" );
data/globus-gass-cache-10.1/globus_gass_cache.c:632: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         dir[PATH_MAX];
data/globus-gass-cache-10.1/globus_gass_cache.c:633: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         file[PATH_MAX];
data/globus-gass-cache-10.1/globus_gass_cache.c:634: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         link1[PATH_MAX];
data/globus-gass-cache-10.1/globus_gass_cache.c:635: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         link2[PATH_MAX];
data/globus-gass-cache-10.1/globus_gass_cache.c:661: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(file, O_RDWR|O_CREAT|O_TRUNC, GLOBUS_L_GASS_CACHE_MODE_RW);
data/globus-gass-cache-10.1/globus_gass_cache.c:749: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( *path, dir, dirlen );
data/globus-gass-cache-10.1/globus_gass_cache.c:757: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( p, file, filelen );
data/globus-gass-cache-10.1/globus_gass_cache.c:762: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( p, uniq, uniqlen );
data/globus-gass-cache-10.1/globus_gass_cache.c:853: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( mangled, "%%%02x", c );
data/globus-gass-cache-10.1/globus_gass_cache.c:911:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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   md5[MD5_DIGEST_LENGTH], *md5ptr = &md5[0];
data/globus-gass-cache-10.1/globus_gass_cache.c:924: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( mangled, "%02x", *md5ptr );
data/globus-gass-cache-10.1/globus_gass_cache.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        hostname[MAXHOSTNAMELEN];
data/globus-gass-cache-10.1/globus_gass_cache.c:1122: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        uniq_string[UNIQ_NAME_MAX];
data/globus-gass-cache-10.1/globus_gass_cache.c:1648:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char uniq_name[1024], data_name[1024];
data/globus-gass-cache-10.1/globus_gass_cache.c:4476: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            name_path[PATH_MAX+1];
data/globus-gass-cache-10.1/globus_gass_cache.c:4507: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        new_mangled[ PATH_MAX + 1 ];
data/globus-gass-cache-10.1/globus_gass_cache.c:4676: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        f_name[PATH_MAX+1];     /* path name of the 3 files to open */
data/globus-gass-cache-10.1/globus_gass_cache.c:4678: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        log_f_name[PATH_MAX+1]; /* log file file name */
data/globus-gass-cache-10.1/globus_gass_cache.c:4681: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        homedir[PATH_MAX];
data/globus-gass-cache-10.1/globus_gass_cache.c:4903:22:  [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).
            levels = atoi( value );
data/globus-gass-cache-10.1/globus_gass_cache.c:4965:14:  [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(f_name, "a");
data/globus-gass-cache-10.1/globus_gass_cache.c:4996: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    tmp[20];
data/globus-gass-cache-10.1/globus_gass_cache.c:5010:38:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
            cache_handle->log_FILE = fopen( log_f_name, "a" );
data/globus-gass-cache-10.1/globus_gass_cache.c:5497: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-gass-cache-10.1/globus_gass_cache.c:5886: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-gass-cache-10.1/globus_gass_cache.c:5887: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( buf, "DELETE; %.3fs", TODOGetTime() - TODOstime );
data/globus-gass-cache-10.1/globus_gass_cache.c:5963: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-gass-cache-10.1/globus_gass_cache.c:5964: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( buf, "Cleanup %d; %.3fs",
data/globus-gass-cache-10.1/globus_gass_cache.c:6081: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        buff[1024];
data/globus-gass-cache-10.1/globus_gass_cache.c:6109: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-gass-cache-10.1/globus_gass_cache.c:6110: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( buf,
data/globus-gass-cache-10.1/globus_gass_cache_config.c:83: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(file, O_RDONLY);
data/globus-gass-cache-10.1/globus_gass_cache.c:420:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy( error->msgbuf, msg, CACHE_ERROR_MSGSIZE );
data/globus-gass-cache-10.1/globus_gass_cache.c:724: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).
    globus_size_t   dirlen = strlen( dir );
data/globus-gass-cache-10.1/globus_gass_cache.c:731: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).
    filelen = (file) ? strlen( file ) : 0;
data/globus-gass-cache-10.1/globus_gass_cache.c:732: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).
    uniqlen = (uniq) ? strlen( uniq ) : 0;
data/globus-gass-cache-10.1/globus_gass_cache.c:919: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).
        MD5( (const unsigned char *) string, strlen(string), md5 );
data/globus-gass-cache-10.1/globus_gass_cache.c:994:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            len += strlen( option-> prefix ) + 1; /* for the separator */
data/globus-gass-cache-10.1/globus_gass_cache.c:1024: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).
        mptr += strlen( mptr );
data/globus-gass-cache-10.1/globus_gass_cache.c:1061:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    int         len = strlen( root ) + 1;               /* root + '\0' */
data/globus-gass-cache-10.1/globus_gass_cache.c:1069:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len += ( strlen( mangled_tag ) + 1 );           /* + slash */
data/globus-gass-cache-10.1/globus_gass_cache.c:1075:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        len += ( strlen( mangled_url ) + 1 );           /* + slash */
data/globus-gass-cache-10.1/globus_gass_cache.c:2055: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).
        prefix_len = strlen(prefix);
data/globus-gass-cache-10.1/globus_gass_cache.c:2345:37:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    char        *temppath = malloc( strlen( filepath ) + 1 );
data/globus-gass-cache-10.1/globus_gass_cache.c:2349: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).
    unsigned    length = strlen( filepath );
data/globus-gass-cache-10.1/globus_gass_cache.c:2373:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(temppath,filepath,n);
data/globus-gass-cache-10.1/globus_gass_cache.c:2393: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).
            pos = filepath + strlen( filepath );
data/globus-gass-cache-10.1/globus_gass_cache.c:2402:13:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
            strcpy( temppath, "/" );
data/globus-gass-cache-10.1/globus_gass_cache.c:2406:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy( temppath, filepath, offset );
data/globus-gass-cache-10.1/globus_gass_cache.c:2470: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).
        if ( length <= strlen( temppath ) )
data/globus-gass-cache-10.1/globus_gass_cache.c:2669: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(p) > strlen(base))
data/globus-gass-cache-10.1/globus_gass_cache.c:2669: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).
            if (strlen(p) > strlen(base))
data/globus-gass-cache-10.1/globus_gass_cache.c:2703: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).
    unsigned    length = strlen( mangle_base );
data/globus-gass-cache-10.1/globus_gass_cache.c:2718:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    while( strlen( fullpath ) > length )
data/globus-gass-cache-10.1/globus_gass_cache.c:2829: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).
        int len = strlen(data_list[data_num]->d_name) - DATA_FILE_PAT_LEN;
data/globus-gass-cache-10.1/globus_gass_cache.c:3024: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).
        names->url, strlen( names->url )  );
data/globus-gass-cache-10.1/globus_gass_cache.c:3910: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).
        names->tag, strlen( names->tag )  );
data/globus-gass-cache-10.1/globus_gass_cache.c:4512:17:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
                strcat( new_mangled, "/" );
data/globus-gass-cache-10.1/globus_gass_cache.c:4718:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        f_name_length=strlen(cache_directory_path);
data/globus-gass-cache-10.1/globus_gass_cache.c:4733: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 ( pt && (0 == (f_name_length = strlen(pt))) )
data/globus-gass-cache-10.1/globus_gass_cache.c:4746: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).
                f_name_length=strlen(homedir);
data/globus-gass-cache-10.1/globus_gass_cache.c:4759: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).
                 strlen(GLOBUS_L_GASS_CACHE_DEFAULT_DIR_NAME))>=PATH_MAX)
data/globus-gass-cache-10.1/globus_gass_cache.c:4765: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).
                       (int) strlen(GLOBUS_L_GASS_CACHE_DEFAULT_DIR_NAME),
data/globus-gass-cache-10.1/globus_gass_cache.c:4774: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).
                strlen( pt ) +
data/globus-gass-cache-10.1/globus_gass_cache.c:4775: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).
                strlen( GLOBUS_L_DOT_GLOBUS_DIR_NAME ) +
data/globus-gass-cache-10.1/globus_gass_cache.c:4776: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).
                strlen( GLOBUS_L_GASS_CACHE_DEFAULT_DIR_NAME) );
data/globus-gass-cache-10.1/globus_gass_cache.c:4788: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).
                strlen( cache_handle->cache_directory_path );
data/globus-gass-cache-10.1/globus_gass_cache.c:5115: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).
        int     max_dirlen = strlen( cache_handle->global_directory_path ) + 8;
data/globus-gass-cache-10.1/globus_gass_cache.c:6060: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).
             ( strlen( url_elem->mangled ) > 0 )  )
data/globus-gass-cache-10.1/globus_gass_cache_config.c:42: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).
    int    len  = strlen(str);
data/globus-gass-cache-10.1/globus_gass_cache_config.c:109:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        n = read(fd, config->buf+i, length-i);
data/globus-gass-cache-10.1/globus_gass_cache_config.c:137: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 (*p=='#' || !strlen(p))     /* a comment or empty line */

ANALYSIS SUMMARY:

Hits = 115
Lines analyzed = 7233 in approximately 0.18 seconds (40034 lines/second)
Physical Source Lines of Code (SLOC) = 4531
Hits@level = [0]   7 [1]  40 [2]  36 [3]   7 [4]  32 [5]   0
Hits@level+ = [0+] 122 [1+] 115 [2+]  75 [3+]  39 [4+]  32 [5+]   0
Hits/KSLOC@level+ = [0+] 26.9256 [1+] 25.3807 [2+] 16.5526 [3+] 8.60737 [4+] 7.06246 [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.