summaryrefslogtreecommitdiff
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-21 12:52:23 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-21 18:42:00 +0100
commitea1e630c47e70672a7933c048090601ce09c8195 (patch)
tree5edf13663163291fc08d682d4f34cf167ad0f49c /libavcodec/rv34.c
parent55328d5f7246d0f0e3892e253ac28600d1db75df (diff)
downloadffmpeg-ea1e630c47e70672a7933c048090601ce09c8195.tar.gz
vcodec/rv34: use av_mallocz() to allocate tables
Fixes use of uninitialized memory Fixes: msan_uninit-mem_7f75e2a55b88_4146_brokenaudio.rmvb Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 1aee59ce73..da2d530a1a 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1362,11 +1362,11 @@ static int rv34_decoder_alloc(RV34DecContext *r)
{
r->intra_types_stride = r->s.mb_width * 4 + 4;
- r->cbp_chroma = av_malloc(r->s.mb_stride * r->s.mb_height *
+ r->cbp_chroma = av_mallocz(r->s.mb_stride * r->s.mb_height *
sizeof(*r->cbp_chroma));
- r->cbp_luma = av_malloc(r->s.mb_stride * r->s.mb_height *
+ r->cbp_luma = av_mallocz(r->s.mb_stride * r->s.mb_height *
sizeof(*r->cbp_luma));
- r->deblock_coefs = av_malloc(r->s.mb_stride * r->s.mb_height *
+ r->deblock_coefs = av_mallocz(r->s.mb_stride * r->s.mb_height *
sizeof(*r->deblock_coefs));
r->intra_types_hist = av_malloc(r->intra_types_stride * 4 * 2 *
sizeof(*r->intra_types_hist));