[FFmpeg-cvslog] avcodec/vqavideo: use av_mallocz() for decode_buffer()

Michael Niedermayer git at videolan.org
Wed Jan 1 15:41:54 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jan  1 15:29:20 2014 +0100| [e6364ea26df9b39023f6986200dc1731b7bdf2d3] | committer: Michael Niedermayer

avcodec/vqavideo: use av_mallocz() for decode_buffer()

Fixes use of uninitialized memory
Fixes: msan_uninit-mem_7f62eaba897d_595_4D6EFA92.VQA
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=e6364ea26df9b39023f6986200dc1731b7bdf2d3
---

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

diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 9133855..c34849d5 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -179,7 +179,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
     /* allocate decode buffer */
     s->decode_buffer_size = (s->width / s->vector_width) *
         (s->height / s->vector_height) * 2;
-    s->decode_buffer = av_malloc(s->decode_buffer_size);
+    s->decode_buffer = av_mallocz(s->decode_buffer_size);
     if (!s->decode_buffer)
         goto fail;
 



More information about the ffmpeg-cvslog mailing list