1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-08-23 18:01:50 +02:00

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

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