Fix out of bound reads in the QDM2 decoder.
authorLaurent Aimar <fenrir@videolan.org>
Fri, 30 Sep 2011 22:45:04 +0000 (00:45 +0200)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 4 Oct 2011 01:34:19 +0000 (21:34 -0400)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
libavcodec/qdm2.c

index 4c7f881..b68197d 100644 (file)
@@ -1355,6 +1355,8 @@ static void qdm2_fft_decode_tones (QDM2Context *q, int duration, GetBitContext *
             return;
 
         local_int_14 = (offset >> local_int_8);
+        if (local_int_14 >= FF_ARRAY_ELEMS(fft_level_index_table))
+            return;
 
         if (q->nb_channels > 1) {
             channel = get_bits1(gb);