aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-14 21:29:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-14 21:29:19 +0200
commita9bf628bfdad142763880a3d1ccb6058040dda57 (patch)
treee760d223240691b291d091a110f6842c7335528d
parenta6a45774d045007f8262cd7c614804390e53122e (diff)
downloadffmpeg-a9bf628bfdad142763880a3d1ccb6058040dda57.tar.gz
avcodec/dcadec: Check subsubframes
Fixes: CID1239152 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dcadec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index f385db558c..77c3737aa6 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -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);
}