[SCM] libdca packaging branch, master, updated. debian/0.0.5-2-9-gb0aef89

fabian-guest at users.alioth.debian.org fabian-guest at users.alioth.debian.org
Tue Jun 16 09:29:30 UTC 2009


The following commit has been merged in the master branch:
commit dca6cc0456f80f7833413c446514cca294077422
Author: Fabian Greffrath <fabian at debian-unofficial.org>
Date:   Tue Jun 16 11:30:04 2009 +0200

    debian/patches/r89-avoid-crashing-with-invalid-frames.patch: Avoid crashing with invalid frames setting a bitalloc_huffman component to 7.

diff --git a/debian/patches/r89-avoid-crashing-with-invalid-frames.patch b/debian/patches/r89-avoid-crashing-with-invalid-frames.patch
new file mode 100644
index 0000000..53734e1
--- /dev/null
+++ b/debian/patches/r89-avoid-crashing-with-invalid-frames.patch
@@ -0,0 +1,26 @@
+r89 | sam | 2008-07-19 22:26:17 +0000 (Sat, 19 Jul 2008) | 2 lines
+  * parse.c: avoid crashing with invalid frames setting a bitalloc_huffman
+    component to 7.
+
+--- libdca.orig/libdca/parse.c
++++ libdca/libdca/parse.c
+@@ -364,7 +364,10 @@
+     for (i = 0; i < state->prim_channels; i++)
+     {
+         state->bitalloc_huffman[i] = bitstream_get (state, 3);
+-        /* if (state->bitalloc_huffman[i] == 7) bailout */
++        /* There might be a way not to trash the whole frame, but for
++         * now we must bail out or we will buffer overflow later. */
++        if (state->bitalloc_huffman[i] == 7)
++            return 1;
+ #ifdef DEBUG
+         fprintf (stderr, "bit allocation quantizer: %i\n",
+                  state->bitalloc_huffman[i]);
+@@ -541,6 +544,7 @@
+                 k < state->vq_start_subband[j] &&
+                 state->bitalloc[j][k] > 0)
+             {
++                /* tmode cannot overflow since transient_huffman[j] < 4 */
+                 state->transition_mode[j][k] = InverseQ (state,
+                     tmode[state->transient_huffman[j]]);
+             }
diff --git a/debian/patches/series b/debian/patches/series
index ca85ec6..a0782a9 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@ r83-mark-tables-as-static-constants.patch
 r84-normalisation-factor-sqrt2+output-bias.patch 
 r87-sanity-check-for-subframes-and-prim_channels.patch 
 r88-fix-random-crashes-caused-by-invalid-32-bit-shifts.patch 
+r89-avoid-crashing-with-invalid-frames.patch 

-- 
libdca packaging



More information about the pkg-multimedia-commits mailing list