[FFmpeg-cvslog] avcodec/flacdec: Call ff_flacdsp_init() unconditionally

Michael Niedermayer git at videolan.org
Tue Dec 16 00:27:15 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 26 03:29:03 2014 +0100| [11e5106c56a0f81759b9284369081f922364582a] | committer: Michael Niedermayer

avcodec/flacdec: Call ff_flacdsp_init() unconditionally

Fixes out of array access
Fixes: signal_sigsegv_324b135_3398_cov_246853371_short.flac
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit e5c01ccdf5a9a330d4c51a9b9ea721fd8f1fb70b)

Conflicts:

	libavcodec/flacdec.c

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

 libavcodec/flacdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index 91a25f0..872aa1d 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -463,10 +463,10 @@ static int decode_frame(FLACContext *s)
         ret = allocate_buffers(s);
         if (ret < 0)
             return ret;
-        ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
         s->got_streaminfo = 1;
         dump_headers(s->avctx, (FLACStreaminfo *)s);
     }
+    ff_flacdsp_init(&s->dsp, s->avctx->sample_fmt, s->bps);
 
 //    dump_headers(s->avctx, (FLACStreaminfo *)s);
 



More information about the ffmpeg-cvslog mailing list