Don't load libraries with non-standard file extensions
Also don't allow writting files ending in a library extension such as ".so.0" or ".dylib.0".
This commit is contained in:
1 parent
fbada2caf6
commit
05858d30e8
6 files changed
+64
-11
No files matched your search
@@ -566,7 +566,7 @@ static void FS_CheckFilenameIsMutable( const char *filename,
|
||||
const char *function )
|
||||
{
|
||||
// Check if the filename ends with the library, QVM, or pk3 extension
|
||||
if( COM_CompareExtension( filename, DLL_EXT )
|
||||
if( Sys_DllExtension( filename )
|
||||
|| COM_CompareExtension( filename, ".qvm" )
|
||||
|| COM_CompareExtension( filename, ".pk3" ) )
|
||||
{
|
||||
|
||||
@@ -1072,6 +1072,8 @@ void * QDECL Sys_LoadGameDll( const char *name, intptr_t (QDECL **entryPoint)(in
|
||||
intptr_t (QDECL *systemcalls)(intptr_t, ...) );
|
||||
void Sys_UnloadDll( void *dllHandle );
|
||||
|
||||
qboolean Sys_DllExtension( const char *name );
|
||||
|
||||
char *Sys_GetCurrentUser( void );
|
||||
|
||||
void QDECL Sys_Error( const char *error, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
|
||||
|
||||
Reference in new issue
Block a user