From: <sag...@us...> - 2012-06-12 15:45:23
|
Revision: 1298 http://modplug.svn.sourceforge.net/modplug/?rev=1298&view=rev Author: saga-games Date: 2012-06-12 15:45:16 +0000 (Tue, 12 Jun 2012) Log Message: ----------- [Fix] Insufficient sample loop validity checks when sanitizing samples. [Mod] OpenMPT: Version is now 1.20.01.07 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-06-09 11:45:45 UTC (rev 1297) +++ trunk/OpenMPT/mptrack/version.h 2012-06-12 15:45:16 UTC (rev 1298) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 01 -#define VER_MINORMINOR 06 +#define VER_MINORMINOR 07 //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/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2012-06-09 11:45:45 UTC (rev 1297) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2012-06-12 15:45:16 UTC (rev 1298) @@ -1329,7 +1329,9 @@ // Fix bad loops // Second condition is to fix some old S3M files which have very short loops just before some garbage data. Very dirty method (just like the rest of this "fixing")! - if((sample.nLoopEnd + 3 >= numSamples || sample.nLoopEnd == sample.nLoopStart + 1) && (sample.uFlags & (CHN_LOOP | CHN_PINGPONGLOOP | CHN_STEREO)) == CHN_LOOP) + if((sample.nLoopEnd + 3 >= numSamples || sample.nLoopEnd == sample.nLoopStart + 1) + && sample.nLoopEnd <= sample.nLength && sample.nLoopStart < sample.nLoopEnd + && (sample.uFlags & (CHN_LOOP | CHN_PINGPONGLOOP | CHN_STEREO)) == CHN_LOOP) { data[sample.nLoopEnd] = data[sample.nLoopStart]; data[sample.nLoopEnd + 1] = data[sample.nLoopStart + 1]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |