Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-17 06:18:58 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-01-13 01:10:33 +0400
commit1014e20492d529ba165227a5376d9199a4e24175 (patch)
tree9afa58a8d4c051d13cf19701f603c32e91ab53e3
parent431cf16963fccd28051ee81e82d8dff1acac30dd (diff)
atrac3: Fix crash in tonal component decoding.n0.6.5
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 5179c345cf..49f70d2516 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -393,6 +393,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;