1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avcodec/dcadec: Check subsubframes

Fixes: CID1239152

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-05-14 21:29:19 +02:00
parent a6a45774d0
commit a9bf628bfd

View File

@ -437,6 +437,10 @@ static int dca_subframe_header(DCAContext *s, int base_channel, int block_index)
if (!base_channel) {
s->subsubframes[s->current_subframe] = get_bits(&s->gb, 2) + 1;
if (block_index + s->subsubframes[s->current_subframe] > s->sample_blocks/8) {
s->subsubframes[s->current_subframe] = 1;
return AVERROR_INVALIDDATA;
}
s->partial_samples[s->current_subframe] = get_bits(&s->gb, 3);
}