mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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>
This commit is contained in:
parent
55328d5f72
commit
ea1e630c47
@ -1362,11 +1362,11 @@ static int rv34_decoder_alloc(RV34DecContext *r)
|
|||||||
{
|
{
|
||||||
r->intra_types_stride = r->s.mb_width * 4 + 4;
|
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));
|
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));
|
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));
|
sizeof(*r->deblock_coefs));
|
||||||
r->intra_types_hist = av_malloc(r->intra_types_stride * 4 * 2 *
|
r->intra_types_hist = av_malloc(r->intra_types_stride * 4 * 2 *
|
||||||
sizeof(*r->intra_types_hist));
|
sizeof(*r->intra_types_hist));
|
||||||
|
Loading…
Reference in New Issue
Block a user