1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/bink: use av_mallocz for data

Fixes use of uninitialized memory
Fixes msan_uninit-mem_7fe8a5fd759d_2838_SPECTRE.BIK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-12-15 16:52:37 +01:00
parent 0e0f6bd4a5
commit e838c9852e

View File

@ -185,7 +185,7 @@ static av_cold int init_bundles(BinkContext *c)
blocks = bw * bh;
for (i = 0; i < BINKB_NB_SRC; i++) {
c->bundle[i].data = av_malloc(blocks * 64);
c->bundle[i].data = av_mallocz(blocks * 64);
if (!c->bundle[i].data)
return AVERROR(ENOMEM);
c->bundle[i].data_end = c->bundle[i].data + blocks * 64;