(#3767) Some protection from malicious qvms - patches and ideas by Amanieu d'Antras and Ben Millwood
This commit is contained in:
parent
657c791257
commit
8c3f320504
12 changed files with 155 additions and 26 deletions
|
@ -2910,13 +2910,13 @@ static void FS_Startup( const char *gameName )
|
|||
fs_packFiles = 0;
|
||||
|
||||
fs_debug = Cvar_Get( "fs_debug", "0", 0 );
|
||||
fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT );
|
||||
fs_basepath = Cvar_Get ("fs_basepath", Sys_DefaultInstallPath(), CVAR_INIT|CVAR_PROTECTED );
|
||||
fs_basegame = Cvar_Get ("fs_basegame", "", CVAR_INIT );
|
||||
homePath = Sys_DefaultHomePath();
|
||||
if (!homePath || !homePath[0]) {
|
||||
homePath = fs_basepath->string;
|
||||
}
|
||||
fs_homepath = Cvar_Get ("fs_homepath", homePath, CVAR_INIT );
|
||||
fs_homepath = Cvar_Get ("fs_homepath", homePath, CVAR_INIT|CVAR_PROTECTED );
|
||||
fs_gamedirvar = Cvar_Get ("fs_game", "", CVAR_INIT|CVAR_SYSTEMINFO );
|
||||
|
||||
// add search path elements in reverse priority order
|
||||
|
@ -2926,7 +2926,7 @@ static void FS_Startup( const char *gameName )
|
|||
// fs_homepath is somewhat particular to *nix systems, only add if relevant
|
||||
|
||||
#ifdef MACOS_X
|
||||
fs_apppath = Cvar_Get ("fs_apppath", Sys_DefaultAppPath(), CVAR_INIT );
|
||||
fs_apppath = Cvar_Get ("fs_apppath", Sys_DefaultAppPath(), CVAR_INIT|CVAR_PROTECTED );
|
||||
// Make MacOSX also include the base path included with the .app bundle
|
||||
if (fs_apppath->string[0])
|
||||
FS_AddGameDirectory(fs_apppath->string, gameName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue