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/gridsite-3.0.0~20180202git2fdbc6f/interface/gridsite-gacl.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/interface/gridsite.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_ssl-private.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/delegation.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/findproxyfile.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/gaclexample.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_err.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/mod_ap-compat.h Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/mod_gridsite_example.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/showx509exts.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/test-chain.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/urlencode.c Examining data/gridsite-3.0.0~20180202git2fdbc6f/src/xacmlexample.c FINAL RESULTS: data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3993:4: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. chown(path, ap_unixd_config.user_id, ap_unixd_config.group_id); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2449:5: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. chmod(prvkeyfile, S_IRUSR | S_IWUSR); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2441:11: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. chown(localpath, local_uid, local_gid); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:507: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(s, r->filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:514:14: [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(p, conf->headfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:592: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(s, r->filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:600:14: [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(p, conf->footfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:674: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(s, r->filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:681:14: [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(p, conf->headfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:794: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(s, r->filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:802:14: [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(p, conf->footfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1373: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(s, r->filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1380:18: [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(p, conf->headfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1449: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(s, r->filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1457:18: [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(p, conf->footfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:93:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(destination, getenv("HTTP_DESTINATION")); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:97:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( destName, ptr1 ); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:99:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( destDir, ptr ); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:106:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( passcode, ptr ); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:124:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( destination, getenv("GRST_DESTINATION_TRANSLATED")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:358:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:360:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, realfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:381:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_vfile, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:383:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_vfile, vfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:399:11: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:401:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, vfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:676:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:678:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:694:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_newfile, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:696:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_newfile, newfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:700:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_vfile, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:702:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_vfile, vfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:761:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:763:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:882:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:884:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, realfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:887:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_tmpfile, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:958:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:960:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1118:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fp = popen(shellcmd, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1175:12: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. fp = popen(shellcmd, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1212:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1214:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1312:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_file, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1314:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_file, realfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1421:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(absaclpath, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1423:7: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(absaclpath, GRST_ACL_FILE); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1477:16: [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(d_namepath, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1479:16: [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(d_namepath, namelist[n]->d_name); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1642:10: [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(uri_workspace, adminrole); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:117: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(AclFilename, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:119: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(AclFilename, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:741:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "allow_%s", grst_perm_syms[i]); // Update allowed data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:744:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "deny_%s", grst_perm_syms[i]); // Update denied data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:972:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(dir_path_vfile, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:974:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(dir_path_vfile, vfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:1028:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(AclFilename, dir_path); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:1030:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(AclFilename, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:185:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(sibtreecoords, "%s-%d", treecoords, sibling); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:475:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(coordstmp, sizeof(coordstmp), coords, index, 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:480:5: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(coordstmp, sizeof(coordstmp), coords, index, 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:523:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(&x509name[len], "/%s=%.*s", shortname, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:422:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(dn_coords, sizeof(dn_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:428:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(info_coords, sizeof(info_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:432:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(hash_coords, sizeof(hash_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:436:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(sig_coords, sizeof(sig_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:625:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(coords, sizeof(coords), GRST_ASN1_COORDS_VOMS_INFO, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:628:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(coords, sizeof(coords), GRST_ASN1_COORDS_VOMS_HASH, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:631:4: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(coords, sizeof(coords), GRST_ASN1_COORDS_VOMS_SIG, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:853:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(dn_coords, sizeof(dn_coords), GRST_ASN1_COORDS_ISSUER_DN, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:858:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(dn_coords, sizeof(dn_coords), GRST_ASN1_COORDS_VOMS_DN, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:869:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(serial_coords, sizeof(serial_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:901:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(time1_coords, sizeof(time1_coords), GRST_ASN1_COORDS_TIME1, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:910:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(time2_coords, sizeof(time2_coords), GRST_ASN1_COORDS_TIME2, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:928:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(fqan_coords, sizeof(fqan_coords), GRST_ASN1_COORDS_FQAN, acnumber, 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:945:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(vomscert_coords, sizeof(vomscert_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:980:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(fqan_coords, sizeof(fqan_coords), GRST_ASN1_COORDS_FQAN, acnumber, i); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1451:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(dn_coords, sizeof(dn_coords), GRST_ASN1_COORDS_ISSUER_DN, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1461:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(serial_coords, sizeof(serial_coords), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1494:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(time1_coords, sizeof(time1_coords), GRST_ASN1_COORDS_TIME1, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1501:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(time2_coords, sizeof(time2_coords), GRST_ASN1_COORDS_TIME2, acnumber); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1514:14: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(fqan_coords, sizeof(fqan_coords), GRST_ASN1_COORDS_FQAN, acnumber, i); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1716:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&creds[*lastcred * (credlen + 1)], credtemp); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1729:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&creds[*lastcred * (credlen + 1)], credtemp); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:861:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, pathandfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:878:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(p, "/%s:%s", GRST_ACL_FILE, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:889:10: [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, GRST_ACL_FILE); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:179:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(pathfile, file); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:190:8: [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(p, headfootname); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:276:11: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(cgiposted, querystring); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:282:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namepattern, "&%s=", name); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c:345:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, pathandfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c:359:10: [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, GRST_ACL_FILE); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:175: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(log, fmt, ap); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:230:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(pathbuf, "PATH=%s", AP_SAFE_PATH); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:286:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(firstlinkpath, "%s/%s", mapdir, firstlink); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:304:18: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(otherlinkpath, "%s/%s", mapdir, data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:396:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(encodedfilename, "%s/%s", mapdir, encodedkey); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:410:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(userfilename, "%s/%s", mapdir, mapdirentry->d_name); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:1091:4: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(cmd, &argv[3]); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:318:8: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( remoteserver, destination); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1351: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. else p = getenv("GRST_DN_LISTS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1586: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. else p = getenv("GRST_DN_LISTS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/findproxyfile.c:84:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "v", long_options, &option_index); data/gridsite-3.0.0~20180202git2fdbc6f/src/findproxyfile.c:100:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. proxycache = getenv("GRST_PROXY_CACHE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:62:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *getenv(); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:87:17: [3] (buffer) curl_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. requestURI = curl_getenv("REQUEST_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:93: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. strcpy(destination, getenv("HTTP_DESTINATION")); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:103:13: [3] (buffer) curl_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( (ptr=curl_getenv("HTTP_COOKIE")) != NULL) data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:110:20: [3] (buffer) curl_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. grstPerm = atoi(curl_getenv("GRST_DESTINATION_PERM")); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:124:29: [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. strcpy( destination, getenv("GRST_DESTINATION_TRANSLATED")); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:80:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. sitecast_domain = getenv("SITECAST_DOMAIN"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:89:19: [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. sitecast_port = getenv("SITECAST_PORT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:98:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. request_uri = getenv("REQUEST_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:99:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. https = getenv("HTTPS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:209:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. groups = getenv("SITECAST_GROUPS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:259:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. method = getenv("REQUEST_METHOD"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:67: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. method = getenv("REQUEST_METHOD"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:91:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. s = getenv(p); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:121: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. docroot = getenv("DOCUMENT_ROOT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:149: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. docroot = getenv("DOCUMENT_ROOT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:185: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. docroot = getenv("DOCUMENT_ROOT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:219: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. docroot = getenv("DOCUMENT_ROOT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:253: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. docroot = getenv("DOCUMENT_ROOT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst-delegation.c:287: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. docroot = getenv("DOCUMENT_ROOT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:77:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. requirepasscode = getenv("GRST_REQUIRE_PASSCODE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:78: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. issuedpc = getenv("GRST_PASSCODE_COOKIE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:185:7: [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. p = getenv("CONTENT_TYPE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:347:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dnlistsuri = getenv("GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:348:40: [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 (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:530:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dnlistsuri = getenv("GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:531:40: [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 (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:815:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dnlistsuri = getenv("GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:816:40: [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 (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:818:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. server_name = getenv("SERVER_NAME"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1111:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. unzip = getenv("GRST_UNZIP"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1112:30: [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 (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1168:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. unzip = getenv("GRST_UNZIP"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1169:30: [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 (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1299:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dnlistsuri = getenv("GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1300:40: [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 (dnlistsuri == NULL) dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1397: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. editable = getenv("GRST_EDITABLE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1398:36: [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 (editable == NULL) editable = getenv("REDIRECT_GRST_EDITABLE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1400:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. unzip = getenv("GRST_UNZIP"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1401:30: [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 (unzip == NULL) unzip = getenv("REDIRECT_GRST_UNZIP"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1665:7: [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. p = getenv("REDIRECT_GRST_DN_LISTS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1667:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (p == NULL) p = getenv("GRST_DN_LISTS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1676:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dnlistsuri = getenv("REDIRECT_GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1677:40: [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 (dnlistsuri == NULL) dnlistsuri = getenv("GRST_DN_LISTS_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1679:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. adminrole = getenv("REDIRECT_GRST_DN_LISTS_ADMIN_ROLE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1680:38: [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 (adminrole == NULL) adminrole = getenv("GRST_DN_LISTS_ADMIN_ROLE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1682:17: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. server_name = getenv("SERVER_NAME"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:175:52: [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 (history_mode==1 && GRSTgaclUserHasAURI(user, getenv("REDIRECT_GRST_ADMIN_LIST"))){ data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:831:44: [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. int site_admin=GRSTgaclUserHasAURI(user, getenv("REDIRECT_GRST_ADMIN_LIST")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:951:34: [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 (!GRSTgaclUserHasAURI(user, getenv("REDIRECT_GRST_ADMIN_LIST"))) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:979:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (strcasecmp(getenv("REDIRECT_GRST_ACL_FORMAT"), "XACML") ==0) GRSTxacmlAclSave(acl, dir_path_vfile, dir_uri); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:980:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (strcasecmp(getenv("REDIRECT_GRST_ACL_FORMAT"), "GACL") ==0) GRSTgaclAclSave(acl, dir_path_vfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:121:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((getenv("GRST_NO_LINK") == NULL) && data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:122:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. (getenv("REDIRECT_GRST_NO_LINK") == NULL)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:213:19: [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. help_uri = getenv("REDIRECT_GRST_HELP_URI"); /* can be NULL */ data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:214:19: [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. admin_file = getenv("REDIRECT_GRST_ADMIN_FILE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:215:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. dir_path = getenv("REDIRECT_GRST_DIR_PATH"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:216:19: [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. request_uri = getenv("REQUEST_URI"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:228:19: [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. gsiproxylimit = getenv("REDIRECT_GRST_GSIPROXY_LIMIT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:231:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. grst_auri_i = getenv("GRST_CRED_AURI_0"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:232:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. grst_valid_i = getenv("GRST_CRED_VALID_0"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:252:25: [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. grst_auri_i = getenv(buf); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:262:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if ((dn = getenv("SSL_CLIENT_S_DN")) != NULL) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:268:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (GRSTgaclUserHasAURI(user, getenv("REDIRECT_GRST_ADMIN_LIST"))) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:272:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("REMOTE_HOST"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:293:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. content_type = getenv("CONTENT_TYPE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1747:7: [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. p = getenv("X509_USER_PROXY"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2671:26: [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 ((cred_value = getenv(cred_name)) == NULL) break; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:1196:34: [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 (dnlists == NULL) dnlists = getenv("GRST_DN_LISTS"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:209: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. headname = getenv("REDIRECT_GRST_HEAD_FILE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:210:36: [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 (headname == NULL) headname = getenv("GRST_HEAD_FILE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:225: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. footname = getenv("REDIRECT_GRST_FOOT_FILE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:226:36: [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 (footname == NULL) footname = getenv("GRST_FOOT_FILE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:253:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("CONTENT_LENGTH"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:256:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. querystring = getenv("REDIRECT_QUERY_STRING"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:257:46: [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 (querystring == NULL) querystring = getenv("QUERY_STRING"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:680:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. mapping_type = getenv("GRST_EXEC_METHOD"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:691: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. if ((grst_cred_0 = getenv("GRST_CRED_0")) == NULL) data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:692:42: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. map_x509dn = getenv("SSL_CLIENT_S_DN"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:714:25: [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. map_directory = getenv("GRST_EXEC_DIRECTORY"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:1042:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. diskmode_env = getenv("GRST_DISK_MODE"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1766:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. htcp_conf = getenv("HTCP_CONF"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1775:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "v", long_options, &option_index); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1805:26: [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. common_data.cert = getenv("X509_USER_PROXY"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1817:34: [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. common_data.cert = getenv("X509_USER_CERT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1818:34: [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. common_data.key = getenv("X509_USER_KEY"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1835:56: [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 (common_data.capath == NULL) common_data.capath = getenv("X509_CERT_DIR"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:157:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "v", long_options, &option_index); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:220:42: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (method != HTPROXY_MAKE) cert = getenv("X509_USER_PROXY"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:234:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. cert = getenv("X509_USER_CERT"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:235:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. key = getenv("X509_USER_KEY"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:255:32: [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 (capath == NULL) capath = getenv("X509_CERT_DIR"); data/gridsite-3.0.0~20180202git2fdbc6f/interface/gridsite.h:173:26: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. struct GRSTasn1TagList { char treecoords[GRST_ASN1_MAXCOORDLEN+1]; data/gridsite-3.0.0~20180202git2fdbc6f/interface/gridsite.h:189: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. char serial[GRST_X509_SERIAL_DIGITS+1]; data/gridsite-3.0.0~20180202git2fdbc6f/interface/gridsite.h:228: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. char text[1]; } GRSThtcpCountstr; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:265:19: [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(&escaped[i], "<"); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:270:19: [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(&escaped[i], ">"); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:275:19: [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(&escaped[i], "&"); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:280:19: [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(&escaped[i], """); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:500:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(conf->headfile, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:516:19: [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(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:585:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(conf->footfile, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:602:19: [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(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:649: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 *p, *s, *head_formatted, *header_formatted, data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:683:19: [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(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:711:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(indexheaderpath, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:804:19: [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(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:918: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 *httpurl, *cookievalue, expires_str[APR_RFC822_DATE_LEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:956:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[2048], *filename, *dirname, *basename; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1251:4: [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 *unencname, modified[99], *oneline, *d_namepath, data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1367: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). fd = open(conf->headfile, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1382:23: [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(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1443: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). fd = open(conf->headfile, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1459:23: [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(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1597:15: [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(filename, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1876:53: [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). ((mod_gridsite_dir_cfg *) cfg)->zoneslashes = atoi(parm); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1883: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). gridhttpport = atoi(parm); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2072: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 *p, *q, buf[APRMAXHOSTLEN + 1] = "localhost"; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2353: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(&(session_id[i*2]), "%02X", sess_id[i]); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2362:4: [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 session_id[(SSL_MAX_SSL_SESSION_ID_LENGTH+1)*2+1], *sessionfile = NULL, data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2580:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[80]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2707: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 *p, *q, envname1[30], envname2[30], data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3535:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3536:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3562:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3563:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3657:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3658:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3715:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int s, open, ret; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3720: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 serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3786: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). if (!open) { data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3802:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char reqbuf[GRST_SITECAST_MAXBUF]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3808:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3809:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3811:3: [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((char *) main_server->process->argv[0], "GridSiteCast UDP responder"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gaclexample.c:79:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("https%3A%2F%2Fexample-dn-list", "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:71: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 passcode[100]; data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:72: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 destination[500], destDir[400], destName[100]; data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:110:15: [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). grstPerm = atoi(curl_getenv("GRST_DESTINATION_PERM")); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-copy.c:125:15: [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). fout = fopen( destination, "w" ); data/gridsite-3.0.0~20180202git2fdbc6f/src/gridsite-storage.c:74:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *https, *server_port, *request_uri, *url, *sitecast_port, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:167:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *boundary, *p, oneline[1086], *filename = NULL, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:272:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(dir_path_vfile, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:403:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(dir_path_file, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:549:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(dir_path_vfile, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:613:14: [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). ((fd = mkstemp(tmpgacl)) != -1) && data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:802:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *dir_path_file, *dir_path_tmpfile, *realfile, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:866:12: [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(name, "dn%d", i); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:888:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(dir_path_tmpfile, "/.tmp.XXXXXX"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:890:15: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if (((ofd = mkstemp(dir_path_tmpfile)) != -1) && data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:965:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(dir_path_file, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:981:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *encodedfile, *p, *dndecoded, modified[99], *vfile, *q, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1094:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *shellcmd, *unzip, oneline[129]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1151:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *shellcmd, *unzip, oneline[129]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1216:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(dir_path_file, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1253:35: [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. if (c == '<') { strcpy(&rawpage[i], "<"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1255:35: [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. else if (c == '>') { strcpy(&rawpage[i], ">"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1257:35: [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. else if (c == '&') { strcpy(&rawpage[i], "&"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1259:35: [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. else if (c == '"') { strcpy(&rawpage[i], """); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1293:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *dir_path_file, *rawpage, *p, *dnlistsuri, *server_name, *fulluri, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1316:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(dir_path_file, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1384:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *d_namepath, modified[99], *absaclpath, *editable, *p, *unzip, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1641:10: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(uri_workspace, "/Role="); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1651:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *d_namepath, modified[99], *p, *adminrole, *dnlists_path, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:191:17: [2] (integer) atol: 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). int timestamp=atol(GRSThttpGetCGI("timestamp")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:275:12: [2] (integer) atol: 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). entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:306:48: [2] (integer) atol: 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). int entry_no, cred_no, i, admin=0, timestamp=atol(GRSThttpGetCGI("timestamp")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:318:12: [2] (integer) atol: 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). entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:358:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char variable[30], *cred_auri_i, *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:371:18: [2] (integer) atol: 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). entry_no = atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:373:18: [2] (integer) atol: 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). last_cred_no = atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:386:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(variable, "cred_auri_%d", cred_no); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:437:17: [2] (integer) atol: 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). int timestamp=atol(GRSThttpGetCGI("timestamp")), entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:437:61: [2] (integer) atol: 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). int timestamp=atol(GRSThttpGetCGI("timestamp")), entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:501:12: [2] (integer) atol: 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). entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:550:12: [2] (integer) atol: 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). entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:557:11: [2] (integer) atol: 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). cred_no=atol(GRSThttpGetCGI("cred_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:605:12: [2] (integer) atol: 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). entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:632:49: [2] (integer) atol: 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). StartForm(&bp, dir_uri, dir_path, admin_file, atol(GRSThttpGetCGI("timestamp")), "del_entry"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:658:12: [2] (integer) atol: 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). entry_no=atol(GRSThttpGetCGI("entry_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:666:11: [2] (integer) atol: 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). cred_no=atol(GRSThttpGetCGI("cred_no")); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:688:49: [2] (integer) atol: 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). StartForm(&bp, dir_uri, dir_path, admin_file, atol(GRSThttpGetCGI("timestamp")), "del_cred"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:736:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[30]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:942:7: [2] (integer) atol: 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). if (atol(GRSThttpGetCGI("timestamp"))!=file_info.st_mtime){ data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:250:16: [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, "GRST_CRED_%d", i); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:68: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 str[128]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:82:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"priv [ %d ] ",tag); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:84:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"cont [ %d ]",tag); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:86:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str,"appl [ %d ]",tag); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:153: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 sibtreecoords[512]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:470: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 coordstmp[81]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:541: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[128]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:146: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 buf[64]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:273:4: [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 s[80]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:406:4: [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 *certpath, *certpath2, acvomsdn[200], dn_coords[200], data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:486:24: [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(certpath2, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:525:20: [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(certpath, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:606:4: [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 coords[200]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:668:9: [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(cacertpath, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:747:21: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(lscpath, "r")) != NULL) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:830:4: [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 *asn1string, acissuerdn[200], acvomsdn[200], data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1032:4: [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 s[80], *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1073:9: [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(cacertpath, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1431:4: [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 *asn1string, acissuerdn[200], data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1546:4: [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 s[80], *ucserial; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1667:4: [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 credtemp[credlen+1]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1753:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(p, "/tmp/x509up_u%d", getuid()); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1847:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fp = fopen(cert, "r"))) { data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1893:16: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fp = fopen(key, "r"))) { data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2288: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(*reqtxt, ptr, ptrlen); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2306: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(*keytxt, ptr, ptrlen); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2436:14: [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). fd_ret = mkstemp(prvkeyfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2483: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(*reqtxt, ptr, ptrlen); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2575:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2648:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hash_delegation_id[EVP_MAX_MD_SIZE]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2650:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cred_name[14], *cred_value, *delegation_id; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2681:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&delegation_id[i*2], "%02x", hash_delegation_id[i]); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2704:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char *der_name, *buf, hash_name[EVP_MAX_MD_SIZE], data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2763:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&filename[i*2], "%02x", hash_delegation_id[i]); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2772:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&filename[17 + i*2], "%02x", hash_name[i]); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:610:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:665:33: [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). cred->nist_loa = atoi((char *) xmlNodeGetContent(cur2)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:669: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). cred->delegation = atoi((char *) xmlNodeGetContent(cur2)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:1118:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(fullfilename, O_RDONLY)) < 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:76:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&((*request)[8]), &trans_id, 4); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:111:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&((*message)[8]), &trans_id, 4); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:160:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&((*request)[8]), &trans_id, 4); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:228:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&((*message)[8]), &trans_id, 4); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:243:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(parsed, raw, (void *) &(parsed->method) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:105:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(file, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:391:14: [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(q, "%%%02X", *p); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:431:14: [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(q, "%%%02X", *p); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c:262:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). debugfile=fopen(XACML_DEBUG_FILE, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c:553:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:156:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((log = fopen(AP_LOG_EXEC, "a")) == NULL) { data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:208: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 pathbuf[512]; data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:360: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(&encodedstring[encodedchar], "%%%02x", data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:510: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_buf[100]; data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:597: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 cwd[AP_MAXPATH]; /* current working directory */ data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:598: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 dwd[AP_MAXPATH]; /* docroot working directory */ data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:811: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). if ((pw = getpwuid(atoi(target_uname))) == NULL) { data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:831:15: [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). gid = atoi(target_gname); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:133:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, ptr, realsize); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:237:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char remoteserver[255]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:403:30: [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). common_data->fp = fopen(thisdestination, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:437:30: [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). common_data->fp = fopen(sources[isrc], "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:482:34: [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). common_data->fp = fopen(thisdestination, "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:494:34: [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). common_data->fp = fopen(sources[isrc], "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:699:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *groups, *p, *port, *rest, def_port[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:769:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *request, response[MAXBUF]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:775:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:776:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:885:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *request, response[MAXBUF]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:891:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:892:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1004:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *request, response[MAXBUF]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1010:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char host[INET6_ADDRSTRLEN]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1011:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serv[8]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1131:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( &( ((struct grst_index_blob *) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1290:20: [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(s, &p[namestart], i - namestart); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1307:54: [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). if (p[15] == '"') list[used].length = atoi(&p[16]); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1308:54: [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). else list[used].length = atoi(&p[15]); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1320:56: [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). if (p[14] == '"') list[used].modified = atoi(&p[15]); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1321:56: [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). else list[used].modified = atoi(&p[14]); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1568:14: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). if ((ofd = mkstemp(tmp_ca_roots)) == -1) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1582:20: [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). ifd = open(s, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1648:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[1001], *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1651:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(conf_file, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1707:61: [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). else if (option_index ==14) common_data_ptr->timeout = atoi(optarg); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:209:18: [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). else minutes = atoi(valid); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:266:12: [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). fd = mkstemp(keycert); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:274:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifp = fopen(key, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:282:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifp = fopen(cert, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.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 lineline[80]; data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:502:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffpp = fopen("/proc/self/statm", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:515:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffpp = fopen("/proc/self/statm", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:529:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffpp = fopen("/proc/self/statm", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:549:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffpp = fopen("/proc/self/statm", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:576:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffpp = fopen("/proc/self/statm", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:587:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffpp = fopen("/proc/self/statm", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:601:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ifp = fopen(cert, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/showx509exts.c:27:4: [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 s[80], *t; data/gridsite-3.0.0~20180202git2fdbc6f/src/showx509exts.c:42:9: [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("/tmp/x509up_u13090", "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/showx509exts.c:71: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 *q, buf[100]; data/gridsite-3.0.0~20180202git2fdbc6f/src/showx509exts.c:72:24: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char *dn, hash[EVP_MAX_MD_SIZE]; data/gridsite-3.0.0~20180202git2fdbc6f/src/showx509exts.c:76: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 creds[501][101]; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:119:23: [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 location[GRST_SLASH_MAX_LOCATION+1]; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:251:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, ptr, realsize); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:336:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *request, response[MAXBUF], *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:473:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[80], *pid_environ, *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:482:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(file, O_RDONLY)) == -1) return; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:540:37: [2] (integer) atol: 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). *blocksize = (off_t) atol(&p[20]); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:904:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy( &( ((struct grst_body_text *) data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:933:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1093:20: [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(s, &p[namestart], i - namestart); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1118:54: [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). if (p[15] == '"') list[used].length = atoi(&p[16]); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1119:54: [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). else list[used].length = atoi(&p[15]); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1131:56: [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). if (p[14] == '"') list[used].modified = atoi(&p[15]); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1132:56: [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). else list[used].modified = atoi(&p[14]); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1183:14: [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(q, "%%%2X", *p); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1261:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(disk_filename, O_RDONLY)) == -1) data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1323:8: [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). fd = mkstemp(tempfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1411:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, errorbuffer[CURL_ERROR_SIZE+1] = "", *dirname, *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1422:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1600:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, *path, errorbuffer[CURL_ERROR_SIZE+1] = "", *p; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1610:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1855:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, *tempfile, *encoded_filename, *p, data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1862:8: [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). fd = mkstemp(tempfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2032:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2045:16: [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(localpath, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2085:13: [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(disk_filename, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2096:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(disk_filename, O_RDONLY); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2141:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, *p, errorbuffer[CURL_ERROR_SIZE+1] = "", *localpath; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2148:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2160:16: [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(localpath, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2227:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, *p, *destination, errorbuffer[CURL_ERROR_SIZE+1] = "", data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2235:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2324:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, *p, errorbuffer[CURL_ERROR_SIZE+1] = "", data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2332:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2428:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2473:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *s, *url, *p, errorbuffer[CURL_ERROR_SIZE+1] = "", *localpath; data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2480:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fuse_ctx, fuse_get_context(), sizeof(struct fuse_context)); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2567:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(GRST_SLASH_PIDFILE, "w")) != NULL) data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2675:40: [2] (integer) atol: 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). default_blocksize = (off_t) atol(argv[i+1]); data/gridsite-3.0.0~20180202git2fdbc6f/src/test-chain.c:24:7: [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(chain, "r"); data/gridsite-3.0.0~20180202git2fdbc6f/src/xacmlexample.c:82:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("example-dn-list", "w"); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:259:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). escaped = apr_palloc(pool, strlen(s) + htmlspecials * 6 + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:506: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). strlen(r->filename) + strlen(conf->headfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:506: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). strlen(r->filename) + strlen(conf->headfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:533:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, header_formatted, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:591: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). strlen(r->filename) + strlen(conf->footfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:591: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). strlen(r->filename) + strlen(conf->footfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:617:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, footer_formatted, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:624:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(head_formatted) + strlen(header_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:624: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). length = strlen(head_formatted) + strlen(header_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:625:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(body_formatted) + strlen(admin_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:625: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). strlen(body_formatted) + strlen(admin_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:626:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(footer_formatted); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:673: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). strlen(r->filename) + strlen(conf->headfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:673: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). strlen(r->filename) + strlen(conf->headfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:697:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, header_formatted, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:716:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, indexheadertext, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:793: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). strlen(r->filename) + strlen(conf->footfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:793: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). strlen(r->filename) + strlen(conf->footfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:818:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, footer_formatted, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:831:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(head_formatted) + strlen(header_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:831: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). length = strlen(head_formatted) + strlen(header_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:832:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(body_formatted) + strlen(admin_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:832: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). strlen(body_formatted) + strlen(admin_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:833:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(footer_formatted); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:968: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). (r->unparsed_uri[strlen(r->unparsed_uri) - 1] == '/')) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1222: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(r->filename) > strlen(conf->adminfile) + 1) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1222:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(r->filename) > strlen(conf->adminfile) + 1) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1223: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). (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]), data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1223:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]), data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1225: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). (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1225:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1236: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(r->filename) > 5) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1237: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). (strcmp(&(r->filename[strlen(r->filename)-5]), ".html") == 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1280: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). (onedirent->d_name[strlen(onedirent->d_name) - 1] != '~')) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1345: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). fullurilen = strlen(fulluri); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1348: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). enclen = strlen(encfulluri); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1372: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). s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1372: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). s = malloc(strlen(r->filename) + strlen(conf->headfile) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1399:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, header_formatted, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1448: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). s = malloc(strlen(r->filename) + strlen(conf->footfile)); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1448: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). s = malloc(strlen(r->filename) + strlen(conf->footfile)); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1476:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, footer_formatted, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1485:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = strlen(head_formatted) + strlen(header_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1485: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). length = strlen(head_formatted) + strlen(header_formatted) + data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1486:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(body) + strlen(footer_formatted); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1486:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(body) + strlen(footer_formatted); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1560: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(r->filename) > strlen(conf->adminfile) + 1) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1560:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(r->filename) > strlen(conf->adminfile) + 1) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1561: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). (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]), data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1561:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strcmp(&(r->filename[strlen(r->filename) - strlen(conf->adminfile)]), data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1563: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). (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1563:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (r->filename[strlen(r->filename)-strlen(conf->adminfile)-1] == '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1571: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). if (r->uri[strlen(r->uri) - 1] == '/') data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1608:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:1954: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). if ((*parm != '\0') && (parm[strlen(parm) - 1] == '/')) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2108: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 ((parm1[strlen(parm1)-1] != '/') || (parm2[strlen(parm2)-1] != '/')) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2108:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((parm1[strlen(parm1)-1] != '/') || (parm2[strlen(parm2)-1] != '/')) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2324: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). (strncmp(r->uri, conf->dnlistsuri, strlen(conf->dnlistsuri)) == 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2690: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). i += strlen(p); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:2864:62: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strncmp(&oneline[5], r->uri, strlen(&oneline[5])) != 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3156: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(destination_prefix)) == 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3157: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). destination_uri = &destination[strlen(destination_prefix)-1]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3164:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(destination_prefix)) == 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3165: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). destination_uri = &destination[strlen(destination_prefix)-1]; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3232: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). strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri)) != 0) || data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3233: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). (strlen(r->uri) <= strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri))) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3233: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). (strlen(r->uri) <= strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri))) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3422: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(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri)) == 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3423:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strlen(r->uri) > strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri))) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3423: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). (strlen(r->uri) > strlen(((mod_gridsite_dir_cfg *) cfg)->dnlistsuri))) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3586:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(sitecastaliases[ialias].sitecast_url) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3590: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(sitecastaliases[ialias].sitecast_url))==0)) break; data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3609: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). - strlen(sitecastaliases[ialias].sitecast_url)), data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3610: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). &(htcp_mesg->uri->text[strlen(sitecastaliases[ialias].sitecast_url)]) ); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3618: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). &(htcp_mesg->uri->text[strlen(sitecastaliases[ialias].sitecast_url)]) ); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:3951:55: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). insecure_reneg, strlen(insecure_reneg) ) == 0); data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:4085:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(r->uri, conf->dnlistsuri, strlen(conf->dnlistsuri)) == 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:4088: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). if ((strncmp(r->uri, conf->dnlistsuri, strlen(r->uri)) == 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:4089: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(r->uri) == strlen(conf->dnlistsuri) - 1)) data/gridsite-3.0.0~20180202git2fdbc6f/src/canl_mod_gridsite.c:4089:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). && (strlen(r->uri) == strlen(conf->dnlistsuri) - 1)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:132: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). boundarylen = strlen(boundary); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:134:15: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = getchar()) != EOF) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:351: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). (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:356: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). dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:356:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:359:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:380: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). dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:380:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:382:11: [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(dir_path_vfile, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:398:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:398:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:400:11: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:534: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). (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) == 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:546: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). vfile = makevfilename(file, strlen(pagetext), dn); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:579: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). fwrite(pagetext, strlen(pagetext), sizeof(char), fp); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:587: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(file) > 7) && (strcmp(&file[strlen(file) - 5], ".html") == 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:587: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 ((strlen(file) > 7) && (strcmp(&file[strlen(file) - 5], ".html") == 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:675: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). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:675:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:677:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:693: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). dir_path_newfile = malloc(strlen(dir_path) + strlen(newfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:693:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_newfile = malloc(strlen(dir_path) + strlen(newfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:695:3: [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(dir_path_newfile, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:699: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). dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:699: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). dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:701:3: [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(dir_path_vfile, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:757:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (filedup[strlen(filedup)-1] == '/') filedup[strlen(filedup)-1] = '\0'; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:757: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 (filedup[strlen(filedup)-1] == '/') filedup[strlen(filedup)-1] = '\0'; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:760: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). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:760:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:762:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:822: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). (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) != 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:827:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strncmp(fulldiruri, file, strlen(fulldiruri)) != 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:828: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). ((strncmp(fulldiruri, file, strlen(fulldiruri) - 1) != 0) || data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:829: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(fulldiruri) - 1 != strlen(file)))) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:829: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). (strlen(fulldiruri) - 1 != strlen(file)))) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:881: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). dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:881:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:883:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:886: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). dir_path_tmpfile = malloc(strlen(dir_path) + 13); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:956: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). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:956:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:959:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:971:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) putchar(c); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1016: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). enclen = strlen(encodedfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1210: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). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1210:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(file) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1213:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1251:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1305: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). (strncmp(dnlistsuri, dir_uri, strlen(dnlistsuri)) != 0)) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1310: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). dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1310:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dir_path_file = malloc(strlen(dir_path) + strlen(realfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1313:3: [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(dir_path_file, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1340:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). "size=%d>\n", file, strlen(file)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1420: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). absaclpath = malloc(strlen(dir_path) + sizeof(GRST_ACL_FILE) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1422:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(absaclpath, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1475: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). d_namepath = malloc(strlen(dir_path) + data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1476: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). strlen(namelist[n]->d_name) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1478:16: [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(d_namepath, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1621:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (uri[strlen(uri) - 1] == '/') data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1685: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). encprefixlen = strlen(encprefix); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_file.c:1763: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). admin_file, dnlistsprefix, strlen(dnlistsprefix)+8); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:116: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). AclFilename=malloc(strlen(dir_path)+strlen(file)+2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:116: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). AclFilename=malloc(strlen(dir_path)+strlen(file)+2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:118:5: [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(AclFilename, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:971: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). dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:971: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). dir_path_vfile = malloc(strlen(dir_path) + strlen(vfile) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:973:3: [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(dir_path_vfile, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:1027: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). AclFilename=malloc(strlen(dir_path)+strlen(file)+2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:1027: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). AclFilename=malloc(strlen(dir_path)+strlen(file)+2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_gacl.c:1029:3: [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(AclFilename, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_admin_main.c:94: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). printf("Content-Length: %zd\n", 2 * strlen(status) + 58); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:29: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 (len == 0) len = strlen(asn1time); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:107: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). if ((strlen(treecoords) > GRST_ASN1_MAXCOORDLEN) || data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:112:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(taglist[*lasttag].treecoords, treecoords, GRST_ASN1_MAXCOORDLEN+1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:141:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (bp != NULL) ret = BIO_write(bp, dup, strlen(dup)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:517: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). if (len + 2 + strlen(shortname) + taglist[istr].length >= maxlength) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_asn1.c:526: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 += 2 + strlen(shortname) + taglist[istr].length; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:127:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) <= 6) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:240:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(&p[6], &p[13], strlen(&p[13]) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:247:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(&p[6], &p[13], strlen(&p[13]) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:725: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). cadn_len = strlen(vomscert_cadn); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:726: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). vomsdn_len = strlen(acvomsdn); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:735:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(vodirent->d_name) < 5) continue; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:737:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strcmp(&(vodirent->d_name[strlen(vodirent->d_name)-4]), ".lsc") != 0) continue; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1185:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(new_grst_cert->serial, p, GRST_X509_SERIAL_DIGITS); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1204: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). len = strlen(new_grst_cert->dn); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1205: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). len2 = strlen(new_grst_cert->issuer); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1951:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ASN1_OCTET_STRING_set(kyu_oct, kyu_str, strlen(kyu_str)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:1966:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). ASN1_OCTET_STRING_set(pci_oct, pci_str, strlen(pci_str)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2010:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). certchain = realloc(certchain, strlen(certchain) + ptrlen + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2011:9: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(certchain, ptr, ptrlen); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2673:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). EVP_DigestUpdate(ctx, cred_value, strlen(cred_value)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_canl_x509.c:2756: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). EVP_DigestUpdate(&ctx, delegation_id, strlen(delegation_id)); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:117: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). for (i=strlen(auri) - 1; (i >= 0) && isspace(auri[i]); --i) data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:178: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). for (i=strlen(value) - 1; (i >= 0) && isspace(value[i]); --i) value[i]='\0'; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:857:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(pathandfile); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:867:7: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(path, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:888:10: [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(path, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_gacl.c:1108: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). dn_len = strlen(dn_decoded); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:143: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). (int) (strlen(method) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:144: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). (int) (strlen(method) % 256), method, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:145: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). (int) (strlen(uri) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:146: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). (int) (strlen(uri) % 256), uri, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:148: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). (int) (strlen(req_hdrs) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:149: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). (int) (strlen(req_hdrs) % 256), req_hdrs, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:192: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). (int) (strlen(resp_hdrs) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:193: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). (int) (strlen(resp_hdrs) % 256), resp_hdrs, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:194: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). (int) (strlen(entity_hdrs) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:195: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). (int) (strlen(entity_hdrs) % 256), entity_hdrs, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:196: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). (int) (strlen(cache_hdrs) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:197: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). (int) (strlen(cache_hdrs) % 256), cache_hdrs, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:215: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). (int) (strlen(cache_hdrs) / 256), data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_htcp.c:216: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). (int) (strlen(cache_hdrs) % 256), cache_hdrs, data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:123:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read(fd, p, statbuf.st_size); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:178: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). pathfile = malloc(strlen(file) + strlen(headfootname) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:178: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). pathfile = malloc(strlen(file) + strlen(headfootname) + 2); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:181: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 ((pathfile[strlen(pathfile) - 1] != '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:183:34: [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. S_ISDIR(statbuf.st_mode)) strcat(pathfile, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:260: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). else cgiposted = malloc(contentlength + strlen(querystring) + 4); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:266:16: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:277:11: [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(cgiposted, "&"); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:281: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). namepattern = malloc(strlen(name) + 3); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:288: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). valuestart = &p[strlen(name) + 2]; data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:335:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = strlen(in); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:377: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). out = malloc(3*strlen(in) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_http.c:411: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). out = malloc(3*strlen(in) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c:344: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). path = malloc(strlen(pathandfile) + sizeof(GRST_ACL_FILE) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/grst_xacml.c:358:10: [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(path, "/"); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:237: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). strlen(safe_env_lst[idx]))) { data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:285: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). firstlinkpath = malloc(strlen(mapdir) + 2 + strlen(firstlink)); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:285: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). firstlinkpath = malloc(strlen(mapdir) + 2 + strlen(firstlink)); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:302: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). otherlinkpath = malloc(strlen(mapdir) + 2 + data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:303: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). strlen(mapdirentry->d_name)); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:346:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). encodedstring = (char *) malloc(3 * strlen(rawstring) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:394: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). encodedfilename = malloc(strlen(mapdir) + (size_t) 2 + data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:395: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). strlen(encodedkey)); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:408: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). userfilename = malloc(strlen(mapdir) + (size_t) 2 + data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:409: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). strlen(mapdirentry->d_name)); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:803: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). if (strspn(target_uname, "1234567890") != strlen(target_uname)) { data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:821: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). if (strspn(target_gname, "1234567890") != strlen(target_gname)) { data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:956:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strncmp(cwd, dwd, strlen(dwd))) != 0) { data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:1058:9: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(~diskmode_t); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:1061:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). else umask(AP_SUEXEC_UMASK); data/gridsite-3.0.0~20180202git2fdbc6f/src/gsexec.c:1063:10: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). else umask(~(S_IRUSR | S_IWUSR)); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:268: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). if (destination[strlen(destination) - 1] != '/') data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:380: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). if (destination[strlen(destination) - 1] != '/') data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1145:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). srclen = strlen(source); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1378: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). if (source_url[strlen(source_url)-1] == '/') data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1406: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). ((loclen = strlen(header_data.location)) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1407: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). == ((srclen = strlen(source_url)) + 1)) && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1577: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). (strlen(root_ent->d_name) > 2) && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1578:42: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (strncmp(&(root_ent->d_name[strlen(root_ent->d_name)-2]), data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1587:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((size = read(ifd, buffer, sizeof(buffer))) > 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1671: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). strlen(long_options[option_index].name)) == 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1672: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). (line[strlen(long_options[option_index].name)] == '=')) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1675:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strdup(&line[strlen(long_options[option_index].name) + 1])); data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1895: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). (sources[i][strlen(sources[i])-1] != '/')) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1964:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[optind+i][strlen(argv[optind+i]) - 1] != '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1973:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((argv[optind+i][strlen(argv[optind+i]) - 1] != '/') && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:1988: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 ((argc - optind > 2) && (destination[strlen(destination)-1] != '/')) data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:2037:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(common_data.domain)) == 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:2038: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). ((sources[i][7+strlen(common_data.domain)] == ':') || data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:2039: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). (sources[i][7+strlen(common_data.domain)] == '/'))) || data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:2043:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(common_data.domain)) == 0) && data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:2044: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). ((sources[i][8+strlen(common_data.domain)] == ':') || data/gridsite-3.0.0~20180202git2fdbc6f/src/htcp.c:2045: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). (sources[i][8+strlen(common_data.domain)] == '/'))))) data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:279:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(ifp)) != EOF) fputc(c, ofp); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:287:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(ifp)) != EOF) fputc(c, ofp); data/gridsite-3.0.0~20180202git2fdbc6f/src/htproxyput.c:618:19: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(ifp)) != EOF) data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:259:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(request_data->location, &s[10], GRST_SLASH_MAX_LOCATION); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:489:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((ret = read(fd, &pid_environ[count], allocated - count)) > 0) data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:511:56: [1] (buffer) strlen: Does not handle 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 (p = pid_environ; p < pid_environ + count; p += (strlen(p) + 1)) data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:948:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). srclen = strlen(source); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1163: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). out = malloc(3*strlen(in) + 1); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1251:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(encoded_filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1334:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((write(fd, headline, strlen(headline)) == -1) || data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1372:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(encoded_filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1548: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). len = strlen(list[i].filename); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1790:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(url); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:1793: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). (len + 1 == strlen(request_data.location)) && data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2048:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). else size = read(fd, buf, size); data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2107:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf, data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2113:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf + (block_i - offset), data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2118:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(fd, buf + (block_i - offset), data/gridsite-3.0.0~20180202git2fdbc6f/src/slashgrid.c:2643:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sitecast_domain_len = strlen(sitecast_domain); data/gridsite-3.0.0~20180202git2fdbc6f/src/test-chain.c:34:14: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) { ANALYSIS SUMMARY: Hits = 698 Lines analyzed = 23154 in approximately 0.73 seconds (31738 lines/second) Physical Source Lines of Code (SLOC) = 16195 Hits@level = [0] 344 [1] 267 [2] 234 [3] 96 [4] 98 [5] 3 Hits@level+ = [0+] 1042 [1+] 698 [2+] 431 [3+] 197 [4+] 101 [5+] 3 Hits/KSLOC@level+ = [0+] 64.3408 [1+] 43.0997 [2+] 26.6132 [3+] 12.1642 [4+] 6.23649 [5+] 0.185242 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.