diff options
author | Spec-Chum <spec-chum@users.sourceforge.net> | 2010-03-06 02:13:09 +0300 |
---|---|---|
committer | Spec-Chum <spec-chum@users.sourceforge.net> | 2010-03-06 02:13:09 +0300 |
commit | 2eecc28c1541b2a7091498a6e8368bf63752a600 (patch) | |
tree | a75ab44676413538e80283bdc9378b8673e5f35f /src/filters/BaseClasses | |
parent | c5de176f702251deb1cdf8c2fac103d68ecee3ad (diff) |
Fix potential crash by using _MAX_DRIVE (thanks aggro). Also changed all MAX_PATH to _MAX_PATH for consistency across all files
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@1732 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/filters/BaseClasses')
-rw-r--r-- | src/filters/BaseClasses/dllsetup.cpp | 10 | ||||
-rw-r--r-- | src/filters/BaseClasses/wxdebug.cpp | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/filters/BaseClasses/dllsetup.cpp b/src/filters/BaseClasses/dllsetup.cpp index fe0883895..c14c2f8e1 100644 --- a/src/filters/BaseClasses/dllsetup.cpp +++ b/src/filters/BaseClasses/dllsetup.cpp @@ -116,7 +116,7 @@ AMovieSetupRegisterServer( CLSID clsServer {
// temp buffer
//
- TCHAR achTemp[MAX_PATH];
+ TCHAR achTemp[_MAX_PATH];
// convert CLSID uuid to string and write
// out subkey as string - CLSID\{}
@@ -376,12 +376,12 @@ AMovieDllRegisterServer2( BOOL bRegister ) // get file name (where g_hInst is the
// instance handle of the filter dll)
//
- WCHAR achFileName[MAX_PATH];
+ WCHAR achFileName[_MAX_PATH];
// WIN95 doesn't support GetModuleFileNameW
//
{
- char achTemp[MAX_PATH];
+ char achTemp[_MAX_PATH];
DbgLog((LOG_TRACE, 2, TEXT("- get module file name")));
@@ -538,12 +538,12 @@ AMovieDllRegisterServer( void ) // get file name (where g_hInst is the
// instance handle of the filter dll)
//
- WCHAR achFileName[MAX_PATH];
+ WCHAR achFileName[_MAX_PATH];
{
// WIN95 doesn't support GetModuleFileNameW
//
- char achTemp[MAX_PATH];
+ char achTemp[_MAX_PATH];
if( 0 == GetModuleFileNameA( g_hInst
, achTemp
diff --git a/src/filters/BaseClasses/wxdebug.cpp b/src/filters/BaseClasses/wxdebug.cpp index 4f0e9bdd8..d6aa59802 100644 --- a/src/filters/BaseClasses/wxdebug.cpp +++ b/src/filters/BaseClasses/wxdebug.cpp @@ -248,7 +248,7 @@ HRESULT DbgUniqueProcessName(LPCTSTR inName, LPTSTR outName) }
else
{
- TCHAR pathAndBasename[MAX_PATH] = {0};
+ TCHAR pathAndBasename[_MAX_PATH] = {0};
//there's an extension - zero-terminate the path and basename first by copying
hr = StringCchCopyN(pathAndBasename, MAX_PATH, inName, (size_t)dotPos);
@@ -271,7 +271,7 @@ void WINAPI DbgInitLogTo ( LONG lReturn;
DWORD dwKeyType;
DWORD dwKeySize;
- TCHAR szFile[MAX_PATH] = {0};
+ TCHAR szFile[_MAX_PATH] = {0};
static const TCHAR cszKey[] = TEXT("LogToFile");
dwKeySize = MAX_PATH;
@@ -326,7 +326,7 @@ void WINAPI DbgInitLogTo ( if (INVALID_HANDLE_VALUE == m_hOutput &&
GetLastError() == ERROR_SHARING_VIOLATION)
{
- TCHAR uniqueName[MAX_PATH] = {0};
+ TCHAR uniqueName[_MAX_PATH] = {0};
if (SUCCEEDED(DbgUniqueProcessName(szFile, uniqueName)))
{
m_hOutput = CreateFile(uniqueName, GENERIC_WRITE,
|