This commit is contained in:
twinaphex 2020-09-13 19:46:44 +02:00
parent f730d42c49
commit d09673b2ac
3 changed files with 0 additions and 30 deletions

View File

@ -45,30 +45,6 @@ static bool IsAbsolutePath(const char *path)
return(FALSE);
}
bool MDFN_IsFIROPSafe(const std::string &path)
{
// We could make this more OS-specific, but it shouldn't hurt to try to weed out usage of characters that are path
// separators in one OS but not in another, and we'd also run more of a risk of missing a special path separator case
// in some OS.
if(!MDFN_GetSettingB("filesys.untrusted_fip_check"))
return(true);
if(path.find('\0') != string::npos)
return(false);
if(path.find(':') != string::npos)
return(false);
if(path.find('\\') != string::npos)
return(false);
if(path.find('/') != string::npos)
return(false);
return(true);
}
void MDFN_GetFilePathComponents(const std::string &file_path,
std::string *dir_path_out, std::string *file_base_out,
std::string *file_ext_out)

View File

@ -7,9 +7,6 @@ extern uint32 MDFN_RoundUpPow2(uint32);
void GetFileBase(const char *f);
// File-inclusion for-read-only path, for PSF and CUE/TOC sheet usage.
bool MDFN_IsFIROPSafe(const std::string &path);
std::string MDFN_MakeFName(int type, int id1, const char *cd1);
void MDFN_ltrim(std::string &string);

View File

@ -87,9 +87,6 @@ bool MDFN_GetSettingB(const char *name)
return 0;
if (!strcmp("pce_fast.adpcmlp", name))
return 0;
/* FILESYS */
if (!strcmp("filesys.untrusted_fip_check", name))
return 0;
fprintf(stderr, "unhandled setting B: %s\n", name);
return 0;
}