[FFmpeg-cvslog] atrac3: Fix crash in tonal component decoding.

Michael Niedermayer git at videolan.org
Sat Dec 17 03:36:32 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 17 03:18:58 2011 +0100| [9af6abdc17deb95c9b1f1d9242ba49b8b5e0b016] | committer: Michael Niedermayer

atrac3: Fix crash in tonal component decoding.
Fixes Ticket780
Bug Found by: cosminamironesei

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

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

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

diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index b9f1f51..fcf7c92 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -402,6 +402,8 @@ static int decodeTonalComponents (GetBitContext *gb, tonal_component *pComponent
 
             for (k=0; k<coded_components; k++) {
                 sfIndx = get_bits(gb,6);
+                if(component_count>=64)
+                    return AVERROR_INVALIDDATA;
                 pComponent[component_count].pos = j * 64 + (get_bits(gb,6));
                 max_coded_values = SAMPLES_PER_FRAME - pComponent[component_count].pos;
                 coded_values = coded_values_per_component + 1;



More information about the ffmpeg-cvslog mailing list