Hello community,

here is the log from the commit of package lsp-plugins for openSUSE:Factory 
checked in at 2019-09-04 09:15:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/lsp-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.lsp-plugins.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "lsp-plugins"

Wed Sep  4 09:15:26 2019 rev:3 rq:727971 version:1.1.10

Changes:
--------
--- /work/SRC/openSUSE:Factory/lsp-plugins/lsp-plugins.changes  2019-08-27 
10:22:09.143936505 +0200
+++ /work/SRC/openSUSE:Factory/.lsp-plugins.new.7948/lsp-plugins.changes        
2019-09-04 09:16:22.370929551 +0200
@@ -1,0 +2,5 @@
+Tue Sep  3 09:33:01 UTC 2019 - Luigi Baldoni <[email protected]>
+
+- Added lsp-plugins-fix_memory_corruption.patch
+
+-------------------------------------------------------------------

New:
----
  lsp-plugins-fix_memory_corruption.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ lsp-plugins.spec ++++++
--- /var/tmp/diff_new_pack.LF8v2c/_old  2019-09-04 09:16:24.138929305 +0200
+++ /var/tmp/diff_new_pack.LF8v2c/_new  2019-09-04 09:16:24.150929304 +0200
@@ -24,6 +24,8 @@
 Group:          Productivity/Multimedia/Sound/Utilities
 URL:            http://lsp-plug.in/
 Source:         
https://github.com/sadko4u/lsp-plugins/archive/lsp-plugins-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM lsp-plugins-fix_memory_corruption.patch
+Patch0:         lsp-plugins-fix_memory_corruption.patch
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  ladspa
@@ -53,6 +55,7 @@
 
 %prep
 %setup -q -n %{name}-%{name}-%{version}
+%patch0 -p1
 
 %build
 export PREFIX="%{_prefix}" DOC_PATH="%{_docdir}" LIB_PATH="%{_libdir}"

++++++ lsp-plugins-fix_memory_corruption.patch ++++++
>From 6824c2a9a5f0130f30494981df33f830072f9544 Mon Sep 17 00:00:00 2001
From: sadko4u <[email protected]>
Date: Tue, 3 Sep 2019 01:04:39 +0300
Subject: [PATCH] Merge remote-tracking branch 'origin/spectrum-analyzer' into
 devel

* Fixed memory corruption bug in Analyzer core module that could crash the 
system on
  non-power-of-two buffer sizes. Affected plugins: Parametric Equalizer, 
Graphic Equalizer,
  Spectrum Analyzer, Multiband Compressor.
---
 include/core/util/Analyzer.h | 4 ++--
 src/core/util/Analyzer.cpp   | 5 ++++-
 src/core/util/Counter.cpp    | 2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/core/util/Analyzer.h b/include/core/util/Analyzer.h
index 4253cae5..10a63bb7 100644
--- a/include/core/util/Analyzer.h
+++ b/include/core/util/Analyzer.h
@@ -53,7 +53,7 @@ namespace lsp
             {
                 float      *vBuffer;        // FFT buffer
                 float      *vAmp;           // FFT amplitude
-                size_t      nCounter;       // FFT trigger counter
+                ssize_t     nCounter;       // FFT trigger counter
                 bool        bFreeze;        // Freeze analysis
                 bool        bActive;        // Enable analysis
             } channel_t;
@@ -64,7 +64,7 @@ namespace lsp
             size_t      nRank;
             size_t      nSampleRate;
             size_t      nBufSize;
-            size_t      nFftPeriod;
+            ssize_t     nFftPeriod;
             float       fReactivity;
             float       fTau;
             float       fRate;
diff --git a/src/core/util/Analyzer.cpp b/src/core/util/Analyzer.cpp
index 37fbfe5f..dfc40ba6 100644
--- a/src/core/util/Analyzer.cpp
+++ b/src/core/util/Analyzer.cpp
@@ -205,12 +205,15 @@ namespace lsp
                 // Limit number of samples to be processed
                 if (to_process > ssize_t(samples))
                     to_process      = samples;
+                // Add limitation of processed data according to the FFT 
window size
+                if (to_process > ssize_t(fft_size))
+                    to_process      = fft_size;
 
                 // Move data in the buffer
                 dsp::move(c->vBuffer, &c->vBuffer[to_process], fft_size - 
to_process);
                 dsp::copy(&c->vBuffer[fft_size - to_process], in, to_process);
 
-                // Update counters
+                // Update counter and pointers
                 c->nCounter        += to_process;
                 in                 += to_process;
                 samples            -= to_process;
diff --git a/src/core/util/Counter.cpp b/src/core/util/Counter.cpp
index 912645df..c75a7e7c 100644
--- a/src/core/util/Counter.cpp
+++ b/src/core/util/Counter.cpp
@@ -71,7 +71,7 @@ namespace lsp
 
     bool Counter::submit(size_t samples)
     {
-        ssize_t left    = ssize_t(nCurrent) - samples;
+        ssize_t left    = ssize_t(nCurrent) - ssize_t(samples);
         if (left <= 0)
         {
             nCurrent        = nInitial + (left % ssize_t(nInitial));

Reply via email to