Fixed possible memory corruption in ProcessThread::init().

This commit is contained in:
LoRd_MuldeR 2014-11-30 20:25:22 +01:00
parent 5a290e1560
commit e579a5057d
5 changed files with 12 additions and 19 deletions

View File

@ -93,20 +93,16 @@
<Link> <Link>
<AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions> <AdditionalOptions>"/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>QtCored4.lib;QtGuid4.lib;Winmm.lib;Shlwapi.lib;Sensapi.lib;PowrProf.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>QtCored4.lib;QtGuid4.lib;Winmm.lib;Shlwapi.lib;Sensapi.lib;PowrProf.lib;psapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins\imageformats;$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\lib\Win32;$(SolutionDir)\etc\Prerequisites\keccak\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins\imageformats;$(SolutionDir)\..\Prerequisites\VisualLeakDetector\lib\Win32;$(SolutionDir)\etc\Prerequisites\keccak\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine> <TargetMachine>MachineX86</TargetMachine>
<EntryPointSymbol>lamexp_entry_point</EntryPointSymbol> <EntryPointSymbol>lamexp_entry_point</EntryPointSymbol>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Message>Copy plugin DLL%27s</Message> <Message>Copy VLD DLL%27s</Message>
<Command>mkdir "$(TargetDir)imageformats" <Command>copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.dll" "$(TargetDir)"
copy /Y "$(QTDIR)\plugins\imageformats\q???d4.dll" "$(TargetDir)imageformats\" copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest" "$(TargetDir)"</Command>
copy /Y "$(QTDIR)\plugins\imageformats\q????d4.dll" "$(TargetDir)imageformats\"
copy /Y "$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\bin\Win32\*.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest" "$(TargetDir)"
</Command>
</PostBuildEvent> </PostBuildEvent>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -174,16 +170,14 @@ copy /Y "$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\bin\Win32\*.manifes
</MapFileName> </MapFileName>
<CreateHotPatchableImage> <CreateHotPatchableImage>
</CreateHotPatchableImage> </CreateHotPatchableImage>
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins\imageformats;$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\lib\Win32;$(SolutionDir)\etc\Prerequisites\keccak\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(QTDIR)\lib;$(QTDIR)\plugins\imageformats;$(SolutionDir)\..\Prerequisites\VisualLeakDetector\lib\Win32;$(SolutionDir)\etc\Prerequisites\keccak\lib\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors> <TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
</Link> </Link>
<PostBuildEvent> <PostBuildEvent>
<Message>Copy plugin DLL%27s</Message> <Message>
<Command>mkdir "$(TargetDir)imageformats" </Message>
copy /Y "$(QTDIR)\plugins\imageformats\q???4.dll" "$(TargetDir)imageformats\" <Command>
copy /Y "$(QTDIR)\plugins\imageformats\q????4.dll" "$(TargetDir)imageformats\" </Command>
del "$(TargetDir)imageformats\q???d4.dll"
</Command>
</PostBuildEvent> </PostBuildEvent>
<ResourceCompile> <ResourceCompile>
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 1 #define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 3 #define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 1606 #define VER_LAMEXP_BUILD 1607
#define VER_LAMEXP_CONFG 1558 #define VER_LAMEXP_CONFG 1558
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////

View File

@ -160,7 +160,6 @@ const char* LAMEXP_DEFAULT_TRANSLATION = "LameXP_EN.qm";
*/ */
static __forceinline bool lamexp_check_for_debugger(void) static __forceinline bool lamexp_check_for_debugger(void)
{ {
return false; //FIXME !!!
__try __try
{ {
CloseHandle((HANDLE)((DWORD_PTR)-3)); CloseHandle((HANDLE)((DWORD_PTR)-3));

View File

@ -189,7 +189,7 @@ static int lamexp_main(int &argc, char **argv)
{ {
//Show main window //Show main window
poMainWindow->show(); poMainWindow->show();
iResult = QApplication::instance()->exec(); iResult = qApp->exec();
bAccepted = poMainWindow->isAccepted(); bAccepted = poMainWindow->isAccepted();
//Sync settings //Sync settings

View File

@ -118,7 +118,7 @@ bool ProcessThread::init(void)
emit processStateInitialized(m_jobId, QFileInfo(m_audioFile.filePath()).fileName(), tr("Starting..."), ProgressModel::JobRunning); emit processStateInitialized(m_jobId, QFileInfo(m_audioFile.filePath()).fileName(), tr("Starting..."), ProgressModel::JobRunning);
//Initialize log //Initialize log
handleMessage(QString().sprintf("LameXP v%u.%02u (Build #%u), compiled on %s at %s", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), MUtils::Version::app_build_date().toString(Qt::ISODate).toLatin1().constData(), MUtils::Version::app_build_time())); handleMessage(QString().sprintf("LameXP v%u.%02u (Build #%u), compiled on %s at %s", lamexp_version_major(), lamexp_version_minor(), lamexp_version_build(), MUTILS_UTF8(MUtils::Version::app_build_date().toString(Qt::ISODate)), MUTILS_UTF8(MUtils::Version::app_build_time().toString(Qt::ISODate))));
handleMessage("\n-------------------------------\n"); handleMessage("\n-------------------------------\n");
return true; return true;