[FFmpeg-cvslog] avcodec/wnv1: clear padding area of rbuf

Michael Niedermayer git at videolan.org
Thu Dec 26 14:01:12 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Dec 23 18:09:58 2013 +0100| [14bec7dcf8299f35fff1e2158c6cb8c6d6b2e083] | committer: Michael Niedermayer

avcodec/wnv1: clear padding area of rbuf

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7faa48586020_2145_MAILTEST.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=14bec7dcf8299f35fff1e2158c6cb8c6d6b2e083
---

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

diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index d8532e4..99aee3c 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -78,6 +78,7 @@ static int decode_frame(AVCodecContext *avctx,
         av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer\n");
         return AVERROR(ENOMEM);
     }
+    memset(rbuf + buf_size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
 
     if ((ret = ff_get_buffer(avctx, p, 0)) < 0) {
         av_free(rbuf);



More information about the ffmpeg-cvslog mailing list