[quake3-commits] r1675 - trunk/code/sys

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Oct 17 18:06:52 EDT 2009


Author: thilo
Date: 2009-10-17 18:06:51 -0400 (Sat, 17 Oct 2009)
New Revision: 1675

Modified:
   trunk/code/sys/sys_main.c
Log:
Don't look for DLLs on current working directory anymore, for security reasons.


Modified: trunk/code/sys/sys_main.c
===================================================================
--- trunk/code/sys/sys_main.c	2009-10-16 22:36:57 UTC (rev 1674)
+++ trunk/code/sys/sys_main.c	2009-10-17 22:06:51 UTC (rev 1675)
@@ -381,9 +381,8 @@
 Sys_LoadDll
 
 Used to load a development dll instead of a virtual machine
-#1 look down current path
-#2 look in fs_homepath
-#3 look in fs_basepath
+#1 look in fs_homepath
+#2 look in fs_basepath
 =================
 */
 void *Sys_LoadDll( const char *name, char *fqpath ,
@@ -395,7 +394,6 @@
 	char  fname[MAX_OSPATH];
 	char  *basepath;
 	char  *homepath;
-	char  *pwdpath;
 	char  *gamedir;
 
 	assert( name );
@@ -403,16 +401,12 @@
 	Q_snprintf (fname, sizeof(fname), "%s" ARCH_STRING DLL_EXT, name);
 
 	// TODO: use fs_searchpaths from files.c
-	pwdpath = Sys_Cwd();
 	basepath = Cvar_VariableString( "fs_basepath" );
 	homepath = Cvar_VariableString( "fs_homepath" );
 	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)
 		libHandle = Sys_TryLibraryLoad(basepath, gamedir, fname, fqpath);
 



More information about the quake3-commits mailing list