[SCM] autotalent/master: Add patch to prevent SIGSEGV.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Wed Jun 18 12:15:58 UTC 2014
The following commit has been merged in the master branch:
commit ccc33b17b5ce6a68a25c15a580351f91e973c609
Author: Alessio Treglia <alessio at debian.org>
Date: Wed Jun 18 13:11:34 2014 +0100
Add patch to prevent SIGSEGV.
LP: #1299667
diff --git a/debian/patches/0002-fix_segfaults.patch b/debian/patches/0002-fix_segfaults.patch
new file mode 100644
index 0000000..b28da00
--- /dev/null
+++ b/debian/patches/0002-fix_segfaults.patch
@@ -0,0 +1,43 @@
+Description: Various fixes to prevent SIGSEGV.
+ - A potential division by zero during normalization of audio data may
+ occur, and
+ - Several uninitialized Autotalent struct member variables may be used.
+From: https://launchpadlibrarian.net/171226582/fix-potential-crashes.diff
+Bug-Ubuntu: https://launchpad.net/bugs/1299667
+Forwarded: no
+---
+ autotalent.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- autotalent.orig/autotalent.c
++++ autotalent/autotalent.c
+@@ -397,9 +397,14 @@ instantiateAutotalent(const LADSPA_Descr
+
+ membvars->vthresh = 0.7; // The voiced confidence (unbiased peak) threshold level
+
++ membvars->inpitch = 0;
++ membvars->conf = 0;
++ membvars->outpitch = 0;
++
+ // Pitch shifter initialization
+ membvars->phprdd = 0.01; // Default period
+ membvars->inphinc = (float)1/(membvars->phprdd * SampleRate);
++ membvars->outphinc = membvars->inphinc;
+ membvars->phincfact = 1;
+ membvars->phasein = 0;
+ membvars->phaseout = 0;
+@@ -765,9 +770,11 @@ runAutotalent(LADSPA_Handle Instance,
+ fft_inverse(psAutotalent->fmembvars, psAutotalent->fftfreqre, psAutotalent->fftfreqim, psAutotalent->ffttime);
+
+ // Normalize
+- tf = (float)1/psAutotalent->ffttime[0];
+- for (ti=1; ti<N; ti++) {
+- psAutotalent->ffttime[ti] = psAutotalent->ffttime[ti] * tf;
++ if (psAutotalent->ffttime[0]!=0) {
++ tf = (float)1/psAutotalent->ffttime[0];
++ for (ti=1; ti<N; ti++) {
++ psAutotalent->ffttime[ti] = psAutotalent->ffttime[ti] * tf;
++ }
+ }
+ psAutotalent->ffttime[0] = 1;
+
diff --git a/debian/patches/series b/debian/patches/series
index b5c7eee..17a9374 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
0001-buildsystem.patch
+0002-fix_segfaults.patch
--
autotalent packaging
More information about the pkg-multimedia-commits
mailing list