[FFmpeg-cvslog] ac3_fixed: fix out-of-bound read

Christophe Gisquet git at videolan.org
Sun Mar 15 04:28:31 CET 2015


ffmpeg | branch: release/2.6 | Christophe Gisquet <christophe.gisquet at gmail.com> | Sat Mar 14 11:48:57 2015 +0000| [26bed98d64705348fdc684c2d62c305045dedaec] | committer: Michael Niedermayer

ac3_fixed: fix out-of-bound read

Should also improve decoding, but actually doesn't...

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ac3dec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 2f78d73..ce45186 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -872,7 +872,7 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
                 start_subband += start_subband - 7;
             end_subband    = get_bits(gbc, 3) + 5;
 #if USE_FIXED
-            s->spx_dst_end_freq = end_freq_inv_tab[end_subband];
+            s->spx_dst_end_freq = end_freq_inv_tab[end_subband-5];
 #endif
             if (end_subband   > 7)
                 end_subband   += end_subband   - 7;



More information about the ffmpeg-cvslog mailing list