1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

dcadec: check xch_base_channel against channel_order_tab.

Fix null pointer dereference

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-14 23:37:14 +01:00
parent 51fcf276f8
commit 02d6d05339

View File

@ -2247,6 +2247,8 @@ static int dca_decode_frame(AVCodecContext *avctx, void *data,
} else {
s->channel_order_tab = dca_channel_reorder_nolfe_xch[s->amode];
}
if (s->channel_order_tab[s->xch_base_channel] < 0)
return AVERROR_INVALIDDATA;
} else {
channels = num_core_channels + !!s->lfe;
s->xch_present = 0; /* disable further xch processing */