[SCM] lame/master: Fix decision if sample rate ratio is an integer value or not (Closes: #778529)
fabian-guest at users.alioth.debian.org
fabian-guest at users.alioth.debian.org
Thu Feb 19 17:49:19 UTC 2015
The following commit has been merged in the master branch:
commit bcf5295dd99c3e0a2eb2bd0717a239c459310093
Author: Fabian Greffrath <fabian+debian at greffrath.com>
Date: Thu Feb 19 18:48:43 2015 +0100
Fix decision if sample rate ratio is an integer value or not (Closes: #778529)
diff --git a/debian/patches/int_resample_ratio.patch b/debian/patches/int_resample_ratio.patch
new file mode 100644
index 0000000..1105cca
--- /dev/null
+++ b/debian/patches/int_resample_ratio.patch
@@ -0,0 +1,29 @@
+Subject: Fix decision if sample rate ratio is an integer value or not
+ If the sample rate of the input file is sufficiently close to an
+ integer multiple of the output sample rate, the value of the intratio
+ variable is calculated incorrectly. This leads to further values
+ being miscalculated up to the joff variable which is used as an index
+ to dereference the esv->blackfilt array. This leads top an overflow
+ and causes a segmentation fault.
+Author: Fabian Greffrath <fabian+debian at greffrath.com>
+Bug-Debian: https://bugs.debian.org/778529
+
+--- a/libmp3lame/util.c
++++ b/libmp3lame/util.c
+@@ -26,6 +26,7 @@
+ # include <config.h>
+ #endif
+
++#include <float.h>
+ #include "lame.h"
+ #include "machine.h"
+ #include "encoder.h"
+@@ -544,7 +545,7 @@ fill_buffer_resample(lame_internal_flags
+ if (bpc > BPC)
+ bpc = BPC;
+
+- intratio = (fabs(resample_ratio - floor(.5 + resample_ratio)) < .0001);
++ intratio = (fabs(resample_ratio - floor(.5 + resample_ratio)) < DBL_EPSILON);
+ fcn = 1.00 / resample_ratio;
+ if (fcn > 1.00)
+ fcn = 1.00;
diff --git a/debian/patches/series b/debian/patches/series
index 8732188..3dae2e2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ privacy-breach.patch
msse.patch
0001-Add-check-for-invalid-input-sample-rate.patch
bits_per_sample.patch
+int_resample_ratio.patch
--
lame packaging
More information about the pkg-multimedia-commits
mailing list