From: <sv...@op...> - 2024-06-02 18:20:49
|
Author: sagamusix Date: Sun Jun 2 20:20:42 2024 New Revision: 20912 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=20912 Log: Merged revision(s) 20910 from trunk/OpenMPT: [Fix] DSm: Only the first 48 samples were ever read. [Fix] DSm: It was possible that sample data was read into slots past the last sample slot; for these samples, sample loop lengths were not sanitized, possibly causing an out-of-bounds memory read during playback. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Load_dsm.cpp Modified: branches/OpenMPT-1.31/soundlib/Load_dsm.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Load_dsm.cpp Sun Jun 2 20:19:50 2024 (r20911) +++ branches/OpenMPT-1.31/soundlib/Load_dsm.cpp Sun Jun 2 20:20:42 2024 (r20912) @@ -511,7 +511,7 @@ if(loadFlags & loadSampleData) { - for(SAMPLEINDEX smp = 1; smp <= m_nSamplePreAmp; smp++) + for(SAMPLEINDEX smp = 1; smp <= m_nSamples; smp++) { SampleIO(Samples[smp].uFlags[CHN_16BIT] ? SampleIO::_16bit : SampleIO::_8bit, SampleIO::mono, |