[quake3-commits] r2253 - in trunk/code: qcommon sys
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Jun 14 14:28:58 EDT 2012
Author: zakk
Date: 2012-06-14 14:28:58 -0400 (Thu, 14 Jun 2012)
New Revision: 2253
Modified:
trunk/code/qcommon/qcommon.h
trunk/code/sys/sys_main.c
trunk/code/sys/sys_osx.m
trunk/code/sys/sys_unix.c
trunk/code/sys/sys_win32.c
Log:
CVE-2012-3345
Modified: trunk/code/qcommon/qcommon.h
===================================================================
--- trunk/code/qcommon/qcommon.h 2012-06-01 19:49:07 UTC (rev 2252)
+++ trunk/code/qcommon/qcommon.h 2012-06-14 18:28:58 UTC (rev 2253)
@@ -1120,7 +1120,6 @@
void Sys_SetDefaultHomePath(const char *path);
char *Sys_DefaultHomePath(void);
-const char *Sys_TempPath(void);
const char *Sys_Dirname( char *path );
const char *Sys_Basename( char *path );
char *Sys_ConsoleInput(void);
Modified: trunk/code/sys/sys_main.c
===================================================================
--- trunk/code/sys/sys_main.c 2012-06-01 19:49:07 UTC (rev 2252)
+++ trunk/code/sys/sys_main.c 2012-06-14 18:28:58 UTC (rev 2253)
@@ -140,7 +140,7 @@
*/
static char *Sys_PIDFileName( void )
{
- return va( "%s/%s", Sys_TempPath( ), PID_FILENAME );
+ return va( "%s/%s", Sys_DefaultHomePath( ), PID_FILENAME );
}
/*
Modified: trunk/code/sys/sys_osx.m
===================================================================
--- trunk/code/sys/sys_osx.m 2012-06-01 19:49:07 UTC (rev 2252)
+++ trunk/code/sys/sys_osx.m 2012-06-14 18:28:58 UTC (rev 2253)
@@ -35,28 +35,6 @@
#import <Cocoa/Cocoa.h>
/*
-================
-Sys_TempPath
-================
-*/
-const char *Sys_TempPath( void )
-{
- static UInt8 posixPath[ MAX_OSPATH ];
- FSRef ref;
- if( FSFindFolder( kOnAppropriateDisk,
- kTemporaryFolderType, kCreateFolder, &ref ) == noErr )
- {
- if( FSRefMakePath( &ref, posixPath,
- sizeof( posixPath ) - 1 ) == noErr )
- {
- return (const char *)posixPath;
- }
- }
-
- return "/tmp";
-}
-
-/*
==============
Sys_Dialog
Modified: trunk/code/sys/sys_unix.c
===================================================================
--- trunk/code/sys/sys_unix.c 2012-06-01 19:49:07 UTC (rev 2252)
+++ trunk/code/sys/sys_unix.c 2012-06-14 18:28:58 UTC (rev 2253)
@@ -78,25 +78,8 @@
return homePath;
}
-#ifndef MACOS_X
/*
================
-Sys_TempPath
-================
-*/
-const char *Sys_TempPath( void )
-{
- const char *TMPDIR = getenv( "TMPDIR" );
-
- if( TMPDIR == NULL || TMPDIR[ 0 ] == '\0' )
- return "/tmp";
- else
- return TMPDIR;
-}
-#endif
-
-/*
-================
Sys_Milliseconds
================
*/
Modified: trunk/code/sys/sys_win32.c
===================================================================
--- trunk/code/sys/sys_win32.c 2012-06-01 19:49:07 UTC (rev 2252)
+++ trunk/code/sys/sys_win32.c 2012-06-14 18:28:58 UTC (rev 2253)
@@ -129,24 +129,6 @@
/*
================
-Sys_TempPath
-================
-*/
-const char *Sys_TempPath( void )
-{
- static TCHAR path[ MAX_PATH ];
- DWORD length;
-
- length = GetTempPath( sizeof( path ), path );
-
- if( length > sizeof( path ) || length == 0 )
- return Sys_DefaultHomePath( );
- else
- return path;
-}
-
-/*
-================
Sys_Milliseconds
================
*/
More information about the quake3-commits
mailing list