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

avcodec/alsdec: Use av_mallocz_array() for chan_data to ensure the arrays never contain random data

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-04-18 20:50:23 +02:00
parent ef16501aeb
commit 7e104647a3

View File

@ -1731,9 +1731,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
// allocate and assign channel data buffer for mcc mode
if (sconf->mc_coding) {
ctx->chan_data_buffer = av_malloc_array(num_buffers * num_buffers,
ctx->chan_data_buffer = av_mallocz_array(num_buffers * num_buffers,
sizeof(*ctx->chan_data_buffer));
ctx->chan_data = av_malloc_array(num_buffers,
ctx->chan_data = av_mallocz_array(num_buffers,
sizeof(*ctx->chan_data));
ctx->reverted_channels = av_malloc_array(num_buffers,
sizeof(*ctx->reverted_channels));