From: <sag...@us...> - 2012-10-10 18:57:08
|
Revision: 1372 http://modplug.svn.sourceforge.net/modplug/?rev=1372&view=rev Author: saga-games Date: 2012-10-10 18:57:01 +0000 (Wed, 10 Oct 2012) Log Message: ----------- [Fix] Sample Editor: Loading XI files as samples could lead to a crash due to use-after-free (tx Lucas). [Mod] OpenMPT: Version is now 1.20.03.03 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/SampleFormats.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-10-04 17:16:19 UTC (rev 1371) +++ trunk/OpenMPT/mptrack/version.h 2012-10-10 18:57:01 UTC (rev 1372) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 03 -#define VER_MINORMINOR 02 +#define VER_MINORMINOR 03 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp =================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp 2012-10-04 17:16:19 UTC (rev 1371) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp 2012-10-10 18:57:01 UTC (rev 1372) @@ -1104,6 +1104,9 @@ // Gotta skip 'em all! file.Skip(sizeof(XMSample) * (fileHeader.numSamples - 1)); + CriticalSection cs; + DestroySample(nSample); + ModSample &mptSample = Samples[nSample]; sampleHeader.ConvertToMPT(mptSample); if(GetType() != MOD_TYPE_XM) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |