[FFmpeg-cvslog] avcodec/snow: Initialize spatial_decomposition_count to a valid value

Michael Niedermayer git at videolan.org
Wed Feb 25 21:31:30 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Feb 25 21:18:13 2015 +0100| [dd369c9adbdd6b5bb306db15dce9ad8d370385fc] | committer: Michael Niedermayer

avcodec/snow: Initialize spatial_decomposition_count to a valid value

Fixes undefined behavior
Fixes: signal_sigsegv_24169e6_3445_cov_3778346427_snow_chroma_bug.avi

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=dd369c9adbdd6b5bb306db15dce9ad8d370385fc
---

 libavcodec/snow.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 07ad854..101c8f8 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -434,6 +434,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){
 
     s->avctx= avctx;
     s->max_ref_frames=1; //just make sure it's not an invalid value in case of no initial keyframe
+    s->spatial_decomposition_count = 1;
 
     ff_me_cmp_init(&s->mecc, avctx);
     ff_hpeldsp_init(&s->hdsp, avctx->flags);



More information about the ffmpeg-cvslog mailing list