dcadec: fix reading from prior to an array

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-12-02 04:00:50 +01:00
parent 9e1914dfba
commit ff7e2342bb
1 changed files with 5 additions and 0 deletions

View File

@ -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);