diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-02 04:00:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-02 04:01:41 +0100 |
commit | ff7e2342bbc96ebc0fc51c19ee212ad160f83216 (patch) | |
tree | f1542f903ed96a84571c96fafdac35ece53624e7 | |
parent | 9e1914dfbafb59b424a7c06cfdd324a85c33ef44 (diff) | |
download | ffmpeg-ff7e2342bbc96ebc0fc51c19ee212ad160f83216.tar.gz |
dcadec: fix reading from prior to an array
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/dcadec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 77fe92a693..acbabd64cc 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -2164,6 +2164,11 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data, continue; } + if (s->xch_base_channel < 2) { + av_log_ask_for_sample(avctx, "XCh with fewer than 2 base channels is not supported\n"); + continue; + } + /* much like core primary audio coding header */ dca_parse_audio_coding_header(s, s->xch_base_channel, 0); |