[SCM] libav/experimental: Fixed a segfault in the DCA decoder with corrupted streams.
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:01:56 UTC 2013
The following commit has been merged in the experimental branch:
commit 4e06acbde4a75cf9aa6a3e46dd3a7c6ed1ecfb8f
Author: Laurent Aimar <fenrir at videolan.org>
Date: Fri Feb 26 18:50:01 2010 +0000
Fixed a segfault in the DCA decoder with corrupted streams.
It happens when the number of channels defined by DCAContext:acmod is lower
than DCAContext:prim_channels. In this case, dca_subsubframe() will call
qmf_32_subbands() using s->channel_order_tab[] entries equal to -1.
Originally committed as revision 22083 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 20d7144..e10ced7 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -1244,6 +1244,10 @@ static int dca_decode_frame(AVCodecContext * avctx,
} else
s->channel_order_tab = dca_channel_reorder_nolfe[s->amode];
+ if (s->prim_channels > 0 &&
+ s->channel_order_tab[s->prim_channels - 1] < 0)
+ return -1;
+
if(avctx->request_channels == 2 && s->prim_channels > 2) {
channels = 2;
s->output = DCA_STEREO;
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list