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>
<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>
<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>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
<EntryPointSymbol>lamexp_entry_point</EntryPointSymbol>
</Link>
<PostBuildEvent>
<Message>Copy plugin DLL%27s</Message>
<Command>mkdir "$(TargetDir)imageformats"
copy /Y "$(QTDIR)\plugins\imageformats\q???d4.dll" "$(TargetDir)imageformats\"
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>
<Message>Copy VLD DLL%27s</Message>
<Command>copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)\..\Prerequisites\VisualLeakDetector\bin\Win32\*.manifest" "$(TargetDir)"</Command>
</PostBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>
@ -174,16 +170,14 @@ copy /Y "$(SolutionDir)\etc\Prerequisites\VisualLeakDetector\bin\Win32\*.manifes
</MapFileName>
<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>
</Link>
<PostBuildEvent>
<Message>Copy plugin DLL%27s</Message>
<Command>mkdir "$(TargetDir)imageformats"
copy /Y "$(QTDIR)\plugins\imageformats\q???4.dll" "$(TargetDir)imageformats\"
copy /Y "$(QTDIR)\plugins\imageformats\q????4.dll" "$(TargetDir)imageformats\"
del "$(TargetDir)imageformats\q???d4.dll"
</Command>
<Message>
</Message>
<Command>
</Command>
</PostBuildEvent>
<ResourceCompile>
<PreprocessorDefinitions>_CONFIG_NAME=$(ConfigurationName);%(PreprocessorDefinitions)</PreprocessorDefinitions>

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 1
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 3
#define VER_LAMEXP_BUILD 1606
#define VER_LAMEXP_BUILD 1607
#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)
{
return false; //FIXME !!!
__try
{
CloseHandle((HANDLE)((DWORD_PTR)-3));

View File

@ -189,7 +189,7 @@ static int lamexp_main(int &argc, char **argv)
{
//Show main window
poMainWindow->show();
iResult = QApplication::instance()->exec();
iResult = qApp->exec();
bAccepted = poMainWindow->isAccepted();
//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);
//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");
return true;