diff options
author | Michael Niedermayer <[email protected]> | 2014-12-17 15:33:05 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2015-01-06 18:28:34 +0100 |
commit | c8fb53357dbf15ed8cd881c4f810cd1170b1e501 (patch) | |
tree | ed743b68d20b04d05595f9909369a40940b4625d | |
parent | 30e7dae22c307f4468f85df42737309ced7effb2 (diff) |
avcodec/dcadec: Check that the added xch channel isnt already there
Fixes null pointer dereference
Fixes: signal_sigsegv_369609d_623_cov_2008234281_ES_6.1_16bit.dts
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 7d593495e42e92693cc8f3ce9b42cf3edcea377a)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/dcadec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index c671fcd722..06fd74c8bf 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -2359,6 +2359,10 @@ FF_ENABLE_DEPRECATION_WARNINGS #else if (s->xch_present && !s->xch_disable) { #endif + if (avctx->channel_layout & AV_CH_BACK_CENTER) { + avpriv_request_sample(avctx, "XCh with Back center channel"); + return AVERROR_INVALIDDATA; + } avctx->channel_layout |= AV_CH_BACK_CENTER; if (s->lfe) { avctx->channel_layout |= AV_CH_LOW_FREQUENCY; |