Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package fluidsynth for openSUSE:Factory checked in at 2026-07-28 17:49:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fluidsynth (Old) and /work/SRC/openSUSE:Factory/.fluidsynth.new.2004 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fluidsynth" Tue Jul 28 17:49:24 2026 rev:91 rq:1367975 version:2.5.7 Changes: -------- --- /work/SRC/openSUSE:Factory/fluidsynth/fluidsynth.changes 2026-07-08 17:36:56.882325643 +0200 +++ /work/SRC/openSUSE:Factory/.fluidsynth.new.2004/fluidsynth.changes 2026-07-28 17:50:04.704042418 +0200 @@ -1,0 +2,9 @@ +Sat Jul 25 08:38:19 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 2.5.7 + * Fix a bug where DLS files that contain a PGAL chunk may sound + incorrectly (#1804). + * Fix DLS sample invalidation logic to avoid possible use of + uninitialized memory (#1809). + +------------------------------------------------------------------- Old: ---- fluidsynth-2.5.6.tar.gz New: ---- fluidsynth-2.5.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fluidsynth.spec ++++++ --- /var/tmp/diff_new_pack.6Isbx2/_old 2026-07-28 17:50:06.164093471 +0200 +++ /var/tmp/diff_new_pack.6Isbx2/_new 2026-07-28 17:50:06.168093611 +0200 @@ -20,7 +20,7 @@ %define sover 3 Name: fluidsynth -Version: 2.5.6 +Version: 2.5.7 Release: 0 Summary: A Real-Time Software Synthesizer That Uses Soundfont(tm) License: LGPL-2.1-or-later ++++++ fluidsynth-2.5.6.tar.gz -> fluidsynth-2.5.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/.github/workflows/codeql-analysis.yml new/fluidsynth-2.5.7/.github/workflows/codeql-analysis.yml --- old/fluidsynth-2.5.6/.github/workflows/codeql-analysis.yml 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/.github/workflows/codeql-analysis.yml 2026-07-25 08:57:15.000000000 +0200 @@ -13,10 +13,14 @@ on: push: - branches: [ master ] + branches: + - 'master' + - 'release/**' pull_request: # The branches below must be a subset of the branches above - branches: [ master ] + branches: + - 'master' + - 'release/**' schedule: - cron: '17 18 * * 4' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/.github/workflows/ios.yml new/fluidsynth-2.5.7/.github/workflows/ios.yml --- old/fluidsynth-2.5.6/.github/workflows/ios.yml 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/.github/workflows/ios.yml 2026-07-25 08:57:15.000000000 +0200 @@ -3,6 +3,8 @@ on: pull_request: push: + branches: + - '**' paths-ignore: - '.azure/**' - '.circleci/**' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/.github/workflows/linux.yml new/fluidsynth-2.5.7/.github/workflows/linux.yml --- old/fluidsynth-2.5.6/.github/workflows/linux.yml 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/.github/workflows/linux.yml 2026-07-25 08:57:15.000000000 +0200 @@ -3,6 +3,8 @@ on: pull_request: push: + branches: + - '**' paths-ignore: - '.azure/**' - '.circleci/**' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/.github/workflows/solaris.yml new/fluidsynth-2.5.7/.github/workflows/solaris.yml --- old/fluidsynth-2.5.6/.github/workflows/solaris.yml 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/.github/workflows/solaris.yml 2026-07-25 08:57:15.000000000 +0200 @@ -3,6 +3,8 @@ on: pull_request: push: + branches: + - '**' paths-ignore: - '.azure/**' - '.circleci/**' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/.github/workflows/sonarcloud.yml new/fluidsynth-2.5.7/.github/workflows/sonarcloud.yml --- old/fluidsynth-2.5.6/.github/workflows/sonarcloud.yml 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/.github/workflows/sonarcloud.yml 2026-07-25 08:57:15.000000000 +0200 @@ -3,8 +3,8 @@ # a pull request. push: branches: - - master - - release/** + - 'master' + - 'release/**' paths-ignore: - '.azure/**' - '.circleci/**' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/.github/workflows/windows.yml new/fluidsynth-2.5.7/.github/workflows/windows.yml --- old/fluidsynth-2.5.6/.github/workflows/windows.yml 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/.github/workflows/windows.yml 2026-07-25 08:57:15.000000000 +0200 @@ -4,6 +4,8 @@ workflow_dispatch: pull_request: push: + branches: + - '**' paths-ignore: - '.azure/**' - '.circleci/**' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/CMakeLists.txt new/fluidsynth-2.5.7/CMakeLists.txt --- old/fluidsynth-2.5.6/CMakeLists.txt 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/CMakeLists.txt 2026-07-25 08:57:15.000000000 +0200 @@ -47,7 +47,7 @@ # FluidSynth package version set ( FLUIDSYNTH_VERSION_MAJOR 2 ) set ( FLUIDSYNTH_VERSION_MINOR 5 ) -set ( FLUIDSYNTH_VERSION_MICRO 6 ) +set ( FLUIDSYNTH_VERSION_MICRO 7 ) set ( VERSION "${FLUIDSYNTH_VERSION_MAJOR}.${FLUIDSYNTH_VERSION_MINOR}.${FLUIDSYNTH_VERSION_MICRO}" ) set ( FLUIDSYNTH_VERSION ${VERSION} ) @@ -62,7 +62,7 @@ # This is not exactly the same algorithm as the libtool one, but the results are the same. set ( LIB_VERSION_CURRENT 3 ) set ( LIB_VERSION_AGE 5 ) -set ( LIB_VERSION_REVISION 5 ) +set ( LIB_VERSION_REVISION 6 ) set ( LIB_VERSION_INFO "${LIB_VERSION_CURRENT}.${LIB_VERSION_AGE}.${LIB_VERSION_REVISION}" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/include/fluidsynth/synth.h new/fluidsynth-2.5.7/include/fluidsynth/synth.h --- old/fluidsynth-2.5.6/include/fluidsynth/synth.h 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/include/fluidsynth/synth.h 2026-07-25 08:57:15.000000000 +0200 @@ -461,10 +461,10 @@ enum fluid_basic_channel_modes { FLUID_CHANNEL_MODE_MASK = (FLUID_CHANNEL_OMNI_OFF | FLUID_CHANNEL_POLY_OFF), /**< Mask Poly and Omni bits of #fluid_channel_mode_flags, usually only used internally */ - FLUID_CHANNEL_MODE_OMNION_POLY = FLUID_CHANNEL_MODE_MASK & (~FLUID_CHANNEL_OMNI_OFF & ~FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 0 */ - FLUID_CHANNEL_MODE_OMNION_MONO = FLUID_CHANNEL_MODE_MASK & (~FLUID_CHANNEL_OMNI_OFF & FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 1 */ - FLUID_CHANNEL_MODE_OMNIOFF_POLY = FLUID_CHANNEL_MODE_MASK & (FLUID_CHANNEL_OMNI_OFF & ~FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 2 */ - FLUID_CHANNEL_MODE_OMNIOFF_MONO = FLUID_CHANNEL_MODE_MASK & (FLUID_CHANNEL_OMNI_OFF | FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 3 */ + FLUID_CHANNEL_MODE_OMNION_POLY = (int)FLUID_CHANNEL_MODE_MASK & (int)(~FLUID_CHANNEL_OMNI_OFF & ~FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 0 */ + FLUID_CHANNEL_MODE_OMNION_MONO = (int)FLUID_CHANNEL_MODE_MASK & (int)(~FLUID_CHANNEL_OMNI_OFF & FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 1 */ + FLUID_CHANNEL_MODE_OMNIOFF_POLY = (int)FLUID_CHANNEL_MODE_MASK & (int)(FLUID_CHANNEL_OMNI_OFF & ~FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 2 */ + FLUID_CHANNEL_MODE_OMNIOFF_MONO = (int)FLUID_CHANNEL_MODE_MASK & (int)(FLUID_CHANNEL_OMNI_OFF | FLUID_CHANNEL_POLY_OFF), /**< corresponds to MIDI mode 3 */ FLUID_CHANNEL_MODE_LAST /**< @internal Value defines the count of basic channel modes (#fluid_basic_channel_modes) @warning This symbol is not part of the public API and ABI stability guarantee and may change at any time! */ }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/src/drivers/fluid_adriver.c new/fluidsynth-2.5.7/src/drivers/fluid_adriver.c --- old/fluidsynth-2.5.6/src/drivers/fluid_adriver.c 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/src/drivers/fluid_adriver.c 2026-07-25 08:57:15.000000000 +0200 @@ -344,20 +344,7 @@ if(def) { - fluid_audio_driver_t *driver; - double srate, midi_event_latency; - int period_size; - - fluid_settings_getint(settings, "audio.period-size", &period_size); - fluid_settings_getnum(settings, "synth.sample-rate", &srate); - - midi_event_latency = period_size / srate; - if(midi_event_latency >= 0.05) - { - FLUID_LOG(FLUID_WARN, "You have chosen 'audio.period-size' to be %d samples. Given a sample rate of %.1f this results in a latency of %.1f ms, which will cause MIDI events to be poorly quantized (=untimed) in the synthesized audio (also known as the 'drunken-drummer' syndrome). To avoid that, you're strongly advised to increase 'audio.periods' instead, while keeping 'audio.period-size' small enough to make this warning disappear.", period_size, srate, midi_event_latency*1000.0); - } - - driver = (*def->new)(settings, synth); + fluid_audio_driver_t *driver = (*def->new)(settings, synth); if(driver) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/src/drivers/fluid_mdriver.c new/fluidsynth-2.5.7/src/drivers/fluid_mdriver.c --- old/fluidsynth-2.5.6/src/drivers/fluid_mdriver.c 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/src/drivers/fluid_mdriver.c 2026-07-25 08:57:15.000000000 +0200 @@ -158,6 +158,18 @@ if(driver) { + double srate, midi_event_latency; + int period_size; + + fluid_settings_getint(settings, "audio.period-size", &period_size); + fluid_settings_getnum(settings, "synth.sample-rate", &srate); + + midi_event_latency = period_size / srate; + if(midi_event_latency >= 0.05) + { + FLUID_LOG(FLUID_WARN, "You have chosen 'audio.period-size' to be %d samples. Given a sample rate of %.1f this results in a latency of %.1f ms, which will cause MIDI events received by the MIDI driver to be poorly quantized (=untimed) in the synthesized audio (also known as the 'drunken-drummer' syndrome). To avoid that, you're strongly advised to increase 'audio.periods' instead, while keeping 'audio.period-size' small enough to make this warning disappear.", period_size, srate, midi_event_latency*1000.0); + } + driver->define = def; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fluidsynth-2.5.6/src/sfloader/fluid_dls.cpp new/fluidsynth-2.5.7/src/sfloader/fluid_dls.cpp --- old/fluidsynth-2.5.6/src/sfloader/fluid_dls.cpp 2026-07-04 12:25:20.000000000 +0200 +++ new/fluidsynth-2.5.7/src/sfloader/fluid_dls.cpp 2026-07-25 08:57:15.000000000 +0200 @@ -1487,6 +1487,11 @@ throw std::runtime_error{ "Rewind to start of file failed" }; } + if(filesize < 12) + { + throw std::runtime_error{ "File too short! (< 12 bytes)" }; + } + // Parse DLS // chunk: RIFF[DLS ] // subchunk: ... @@ -1504,21 +1509,36 @@ if(chunk.id != DLS_FCC) { - throw std::runtime_error{ "Not a DLS file" }; + auto* p = (unsigned char *)&chunk.id; + throw std::runtime_error{ string_format("Not a DLS file. Expected header identifier 'DLS ' but found '%c%c%c%c'", p[0], p[1], p[2], p[3]) }; } - if(chunk.size + 8 > filesize) + if(chunk.size + 8LL > filesize) { - throw std::runtime_error{ "DLS file early EOF" }; + uint8_t from[4] = { + static_cast<uint8_t>(chunk.size >> 0), + static_cast<uint8_t>(chunk.size >> 8), + static_cast<uint8_t>(chunk.size >> 16), + static_cast<uint8_t>(chunk.size >> 24), + }; + auto maxSize = filesize - 8LL; + uint8_t to[4] = { + static_cast<uint8_t>(maxSize >> 0), + static_cast<uint8_t>(maxSize >> 8), + static_cast<uint8_t>(maxSize >> 16), + static_cast<uint8_t>(maxSize >> 24), + }; + auto Hint = string_format(" (Hint: Try changing the hexadecimal little-endian size of the RIFF chunk from %02X%02X%02X%02X to %02X%02X%02X%02X using a hex editor.)", from[0], from[1], from[2], from[3], to[0], to[1], to[2], to[3]); + throw std::runtime_error{ string_format("DLS file is too short! Outermost RIFF chunk reports a payload size of %u bytes, but there are only %lld bytes left in the file.%s", chunk.size, maxSize, chunk.size == filesize ? Hint.c_str() : "") }; } - if(chunk.size + 8 < filesize) + if(chunk.size + 8LL < filesize) { - FLUID_LOG(FLUID_WARN, "DLS file has extra data after RIFF chunk"); + FLUID_LOG(FLUID_WARN, "DLS file has extra data after RIFF chunk, ignoring."); } // we don't care about real file size after this point - filesize = chunk.size + 8; + filesize = chunk.size + 8LL; // iterate over chunks in the RIFF form try @@ -1559,7 +1579,7 @@ uint32_t cbsize; READ32(this, cbsize); - if(cbsize < 8) + if(cbsize < 8u) { throw std::runtime_error{ "DLS ptbl chunk has invalid cbSize" }; } @@ -1574,7 +1594,7 @@ throw std::runtime_error{ "Too many poolcue records are contained in the ptbl chunk." }; } - if(cues * 4 + cbsize != subchunk.size) + if(cues * 4u + cbsize != subchunk.size) { throw std::runtime_error{ "DLS ptbl chunk has corrupted size" }; } @@ -1707,7 +1727,7 @@ bool invalid_loops_were_sanitized = false; for(auto &sample : samples) { - fluid_sample_t fluid{}; + auto& fluid = samples_fluid.emplace_back(); fluid.start = sample.start; fluid.end = sample.end - 1; fluid.samplerate = sample.samplerate; @@ -1735,9 +1755,9 @@ fluid.sampletype = FLUID_SAMPLETYPE_MONO; fluid.default_modulators = this->sfont->default_mod_list; - if(fluid_sample_validate(&fluid, sampledata.size() * sizeof(decltype(sampledata)::value_type)) == FLUID_OK) + if(fluid_sample_validate(&fluid, sampledata.size() * sizeof(decltype(sampledata)::value_type)) != FLUID_OK) { - samples_fluid.push_back(std::move(fluid)); + fluid = {}; } } @@ -2802,7 +2822,7 @@ for(auto &instrument : instruments) { if(instrument.banklsb == (bank & 0x7F) && instrument.bankmsb == ((bank >> 7) & 0x7F) && - instrument.pcnum == pc) + instrument.pcnum == pc && !instrument.is_drums) { instrument.aliases.push_back(fluid_dls_instrument::fluid_dls_instrument_alias { @@ -3251,24 +3271,33 @@ // key with subtonal tuning and key number generator applied int tuned_key = static_cast<int>(std::round(tuned_key_f)); - - if(dlspreset->drum_note_aliasing != nullptr && synth->channel[chan]->channel_type == CHANNEL_TYPE_DRUM) + // key with only key number generator applied + int adjusted_key; + if (synth->channel[chan]->channel_type == CHANNEL_TYPE_DRUM) { - tuned_key = dlspreset->drum_note_aliasing[std::clamp(tuned_key, 0, 127)]; + if(dlspreset->drum_note_aliasing != nullptr) + { + tuned_key = dlspreset->drum_note_aliasing[std::clamp(tuned_key, 0, 127)]; + } + // drum channel has no subtonal tuning, so adjusted_key == tuned_Key + adjusted_key = tuned_key; + } + else + { + adjusted_key = static_cast<int>(std::round(key * dlspreset->keynum_scale)); } - - // key with only key number generator applied - const int adjusted_key = static_cast<int>(std::round(key * dlspreset->keynum_scale)); for(auto ®ion : dlspreset->regions) { - if(!fluid_zone_inside_range(®ion.range, tuned_key, vel)) + auto *sample = dlspreset->samples_fluid + region.sampleindex; + // Check for zero-length samples, typically caused by samples that failed fluid_sample_validate() + if(!fluid_zone_inside_range(®ion.range, tuned_key, vel) || sample->start == sample->end) { continue; } auto *voice = fluid_synth_alloc_voice_LOCAL( - synth, dlspreset->samples_fluid + region.sampleindex, chan, adjusted_key, vel, ®ion.range); + synth, sample, chan, adjusted_key, vel, ®ion.range); if(voice == nullptr) {
