BOOL (WINAPI * mySetDllDirectoryA)(const char* lpPathName);
# define PROCESS_DEP_ENABLE 1
- mySetProcessDEPPolicy = (BOOL WINAPI (*)(DWORD))
+ mySetProcessDEPPolicy = (BOOL (WINAPI *)(DWORD))
GetProcAddress(h_Kernel32, "SetProcessDEPPolicy");
if(mySetProcessDEPPolicy)
mySetProcessDEPPolicy(PROCESS_DEP_ENABLE);
/* Do NOT load any library from cwd. */
- mySetDllDirectoryA = (BOOL WINAPI (*)(const char*))
+ mySetDllDirectoryA = (BOOL (WINAPI *)(const char*))
GetProcAddress(h_Kernel32, "SetDllDirectoryA");
if(mySetDllDirectoryA)
mySetDllDirectoryA("");
if (wargv == NULL)
return 1;
- char *argv[argc + 4];
+ char *argv[argc + 3];
BOOL crash_handling = TRUE;
int j = 0;
char *lang = NULL;
argv[j++] = FromWide( L"--media-library" );
- argv[j++] = FromWide( L"--stats" );
argv[j++] = FromWide( L"--no-ignore-config" );
for (int i = 1; i < argc; i++)
{
SetUnhandledExceptionFilter(vlc_exception_filter);
}
- _setmode( STDIN_FILENO, _O_BINARY ); /* Needed for pipes */
+ _setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
/* */
if (!lang)
GetModuleFileName( mbi.AllocationBase, module, 256 );
fwprintf( fd, L"%p|%ls\n", caller, module );
+ if( IsBadReadPtr( pBase, 2 * sizeof( void* ) ) )
+ break;
+
/*The last BP points to NULL!*/
caller = *(pBase + 1);
if( !caller )