diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-17 03:18:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-12 21:54:09 +0100 |
commit | 049b08d04cd5a6e53e0b0814525313fe5bd3e47a (patch) | |
tree | 361915fb42c9d834bf8b705662b1023472681cd6 | |
parent | 8454d81ebe672e33022bc06e461676ca6d7b3299 (diff) | |
download | ffmpeg-049b08d04cd5a6e53e0b0814525313fe5bd3e47a.tar.gz |
atrac3: Fix crash in tonal component decoding.
Fixes Ticket780
Bug Found by: cosminamironesei
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9af6abdc17deb95c9b1f1d9242ba49b8b5e0b016)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/atrac3.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 20ab75dfd7..f16630450d 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -395,6 +395,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 = 1024 - pComponent[component_count].pos; coded_values = coded_values_per_component + 1; |