[FFmpeg-cvslog] Fix out of bound reads in the QDM2 decoder.

Laurent Aimar git at videolan.org
Sat Oct 1 21:39:00 CEST 2011


ffmpeg | branch: release/0.8 | Laurent Aimar <fenrir at videolan.org> | Sat Oct  1 00:45:04 2011 +0200| [e0fb22cea9056afd30848d9d51e92f5ae24ea0f6] | committer: Michael Niedermayer

Fix out of bound reads in the QDM2 decoder.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 491eaf35ae1f9b619441314bec33766e31580184)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e0fb22cea9056afd30848d9d51e92f5ae24ea0f6
---

 libavcodec/qdm2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index 6eb8364..a6192e9 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1353,6 +1353,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);



More information about the ffmpeg-cvslog mailing list