Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-18 21:50:23 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-04-18 21:58:17 +0300
commit5be683d687b6b2b697d34274d7ae56af3f047549 (patch)
treed35dc19a3c861c52ad6fa748225751b3f3f1bcab
parent96c1421627aad9e9216e0d5d50419a880bdc34ee (diff)
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
-rw-r--r--libavcodec/alsdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index e5397951d0..8a8bff15e9 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -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(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);