[FFmpeg-cvslog] avcodec/dcadec: Check that the added xch channel isnt already there

Michael Niedermayer git at videolan.org
Tue Jan 20 03:36:19 CET 2015


ffmpeg | branch: release/2.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 17 15:33:05 2014 +0100| [133dc77da96fe8c4ed042d7a2cce835ef5aba6c3] | committer: Michael Niedermayer

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 <michaelni at gmx.at>
(cherry picked from commit 7d593495e42e92693cc8f3ce9b42cf3edcea377a)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=133dc77da96fe8c4ed042d7a2cce835ef5aba6c3
---

 libavcodec/dcadec.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 4392f03..c02d7a7 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -2349,6 +2349,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;



More information about the ffmpeg-cvslog mailing list