[FFmpeg-cvslog] dcadec: fix reading from prior to an array

Michael Niedermayer git at videolan.org
Sun Dec 2 04:27:03 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec  2 04:00:50 2012 +0100| [ff7e2342bbc96ebc0fc51c19ee212ad160f83216] | committer: Michael Niedermayer

dcadec: fix reading from prior to an array

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 77fe92a..acbabd6 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -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);
 



More information about the ffmpeg-cvslog mailing list