[FFmpeg-cvslog] avcodec/vc1dec: zero SpriteData struct

Michael Niedermayer git at videolan.org
Sat Dec 14 01:56:53 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Dec 14 00:58:18 2013 +0100| [5f00b333a4c3cae7a16bfc94a463ee3b6d97fc21] | committer: Michael Niedermayer

avcodec/vc1dec: zero SpriteData struct

Fixes use of uninitialized data, as alternative alpha could be
calculated conditionally

Fixes part of msan_uninit-mem_7f51a8b0b3b0_1009_Arlington.wmv
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=5f00b333a4c3cae7a16bfc94a463ee3b6d97fc21
---

 libavcodec/vc1dec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index edddc48..daa62d6 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5459,6 +5459,8 @@ static int vc1_decode_sprites(VC1Context *v, GetBitContext* gb)
     AVCodecContext *avctx = s->avctx;
     SpriteData sd;
 
+    memset(&sd, 0, sizeof(sd));
+
     vc1_parse_sprites(v, gb, &sd);
 
     if (!s->current_picture.f.data[0]) {



More information about the ffmpeg-cvslog mailing list