diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-04-18 20:50:23 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-05-06 17:09:29 +0200 |
commit | f0cfa5d98a69931155b44269e56a7a330f33d7a8 (patch) | |
tree | 37b16db8e96576930e8aa8820283f7f845680e25 /libavcodec | |
parent | f0bf5c538a855ba92a5fc90a364411d892493dec (diff) | |
download | ffmpeg-f0cfa5d98a69931155b44269e56a7a330f33d7a8.tar.gz |
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>
(cherry picked from commit 7e104647a3556fc61a139483cee1cb7dfa2dc5bd)
Conflicts:
libavcodec/alsdec.c
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/alsdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index c56c4c502f..abced6126d 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1732,9 +1732,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(sizeof(*ctx->chan_data_buffer) * + ctx->chan_data_buffer = av_mallocz(sizeof(*ctx->chan_data_buffer) * num_buffers * num_buffers); - ctx->chan_data = av_malloc(sizeof(*ctx->chan_data) * + ctx->chan_data = av_mallocz(sizeof(*ctx->chan_data) * num_buffers); ctx->reverted_channels = av_malloc(sizeof(*ctx->reverted_channels) * num_buffers); |