[SCM] lame/master: Avoid malformed wav causing floating point exception

fabian-guest at users.alioth.debian.org fabian-guest at users.alioth.debian.org
Mon Feb 9 06:12:40 UTC 2015


The following commit has been merged in the master branch:
commit 2b84d36c2d864e6578d228ff1f30dc57309d6a2c
Author: Fabian Greffrath <fabian+debian at greffrath.com>
Date:   Mon Feb 9 07:08:30 2015 +0100

    Avoid malformed wav causing floating point exception

diff --git a/debian/patches/bits_per_sample.patch b/debian/patches/bits_per_sample.patch
new file mode 100644
index 0000000..214ca45
--- /dev/null
+++ b/debian/patches/bits_per_sample.patch
@@ -0,0 +1,17 @@
+Description: Avoid malformed wav causing floating point exception (integer divide by zero) 
+Author: Fabian Greffrath <fabian+debian at greffrath.com>
+Bug-Debian: https://bugs.debian.org/777159
+
+--- a/frontend/get_audio.c
++++ b/frontend/get_audio.c
+@@ -1448,6 +1448,10 @@ parse_wave_header(lame_global_flags * gf
+         else {
+             (void) lame_set_in_samplerate(gfp, global_reader.input_samplerate);
+         }
++        /* avoid division by zero */
++        if (bits_per_sample < 1)
++            return -1;
++
+         global. pcmbitwidth = bits_per_sample;
+         global. pcm_is_unsigned_8bit = 1;
+         global. pcm_is_ieee_float = (format_tag == WAVE_FORMAT_IEEE_FLOAT ? 1 : 0);
diff --git a/debian/patches/series b/debian/patches/series
index 131aec5..8732188 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ ansi2knr2devnull.patch
 privacy-breach.patch
 msse.patch
 0001-Add-check-for-invalid-input-sample-rate.patch
+bits_per_sample.patch

-- 
lame packaging



More information about the pkg-multimedia-commits mailing list