Commit 7e104647 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ef16501a
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment