Browse Source

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@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 11 years ago
parent
commit
e6364ea26d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/vqavideo.c

+ 1
- 1
libavcodec/vqavideo.c View File

@@ -179,7 +179,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx)
/* allocate decode buffer */ /* allocate decode buffer */
s->decode_buffer_size = (s->width / s->vector_width) * s->decode_buffer_size = (s->width / s->vector_width) *
(s->height / s->vector_height) * 2; (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) if (!s->decode_buffer)
goto fail; goto fail;




Loading…
Cancel
Save