diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-05-14 21:29:19 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-15 10:04:52 +0200 |
commit | 10e1108732c08ef66d1fe785b87567e8e249b5cb (patch) | |
tree | 070d97450b298495b6f35cee2b44fec878e6809d /libavcodec | |
parent | 3da0395b340bcab94264644a4c69b4b7e99e064b (diff) | |
download | ffmpeg-10e1108732c08ef66d1fe785b87567e8e249b5cb.tar.gz |
avcodec/dcadec: Check subsubframes
Fixes: CID1239152
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a9bf628bfdad142763880a3d1ccb6058040dda57)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dcadec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 81d50324db..7b48e041ef 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -434,6 +434,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); } |