mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-12 23:54:07 +00:00
Don't look for DLLs on current working directory anymore, for security reasons.
This commit is contained in:
parent
504bd58b90
commit
b9ec0e4639
1 changed files with 3 additions and 9 deletions
|
@ -381,9 +381,8 @@ static void* Sys_TryLibraryLoad(const char* base, const char* gamedir, const cha
|
||||||
Sys_LoadDll
|
Sys_LoadDll
|
||||||
|
|
||||||
Used to load a development dll instead of a virtual machine
|
Used to load a development dll instead of a virtual machine
|
||||||
#1 look down current path
|
#1 look in fs_homepath
|
||||||
#2 look in fs_homepath
|
#2 look in fs_basepath
|
||||||
#3 look in fs_basepath
|
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void *Sys_LoadDll( const char *name, char *fqpath ,
|
void *Sys_LoadDll( const char *name, char *fqpath ,
|
||||||
|
@ -395,7 +394,6 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
|
||||||
char fname[MAX_OSPATH];
|
char fname[MAX_OSPATH];
|
||||||
char *basepath;
|
char *basepath;
|
||||||
char *homepath;
|
char *homepath;
|
||||||
char *pwdpath;
|
|
||||||
char *gamedir;
|
char *gamedir;
|
||||||
|
|
||||||
assert( name );
|
assert( name );
|
||||||
|
@ -403,15 +401,11 @@ void *Sys_LoadDll( const char *name, char *fqpath ,
|
||||||
Q_snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
|
Q_snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
|
||||||
|
|
||||||
// TODO: use fs_searchpaths from files.c
|
// TODO: use fs_searchpaths from files.c
|
||||||
pwdpath = Sys_Cwd();
|
|
||||||
basepath = Cvar_VariableString( "fs_basepath" );
|
basepath = Cvar_VariableString( "fs_basepath" );
|
||||||
homepath = Cvar_VariableString( "fs_homepath" );
|
homepath = Cvar_VariableString( "fs_homepath" );
|
||||||
gamedir = Cvar_VariableString( "fs_game" );
|
gamedir = Cvar_VariableString( "fs_game" );
|
||||||
|
|
||||||
libHandle = Sys_TryLibraryLoad(pwdpath, gamedir, fname, fqpath);
|
libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath);
|
||||||
|
|
||||||
if(!libHandle && homepath)
|
|
||||||
libHandle = Sys_TryLibraryLoad(homepath, gamedir, fname, fqpath);
|
|
||||||
|
|
||||||
if(!libHandle && basepath)
|
if(!libHandle && basepath)
|
||||||
libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath);
|
libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath);
|
||||||
|
|
Loading…
Reference in a new issue