Skip to content

Commit

Permalink
atrac3: Fix crash in tonal component decoding.
Browse files Browse the repository at this point in the history
Fixes Ticket780
Bug Found by: cosminamironesei

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Jan 12, 2012
1 parent 1eb7872 commit f13de3c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libavcodec/atrac3.c
Expand Up @@ -454,6 +454,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;
Expand Down

0 comments on commit f13de3c

Please sign in to comment.