aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-11-15 16:53:34 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-12-02 00:28:59 +0100
commit4171249d7632ea4ea2964b992eca7adc12dacb76 (patch)
treeec6d9e1e1a5deb60ab87b4ed3146a5abc65ba2a8
parent2fc1a8ba4984097aca266d6539e52bcfe67d02fb (diff)
downloadffmpeg-4171249d7632ea4ea2964b992eca7adc12dacb76.tar.gz
avcodec/vc2enc: Clear coef_buf on allocation
Fixes: Use of uninitialized memory Fixes: assertion failure Reviewed-by: <atomnuker> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 6d00905f8134a2932e5c00dd1ec8b2a1f0a38035) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/vc2enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index eb4e1e3c7e..ac551caaa1 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -1088,7 +1088,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx)
p->dwt_width = w = FFALIGN(p->width, (1 << s->wavelet_depth));
p->dwt_height = h = FFALIGN(p->height, (1 << s->wavelet_depth));
p->coef_stride = FFALIGN(p->dwt_width, 32);
- p->coef_buf = av_malloc(p->coef_stride*p->dwt_height*sizeof(dwtcoef));
+ p->coef_buf = av_mallocz(p->coef_stride*p->dwt_height*sizeof(dwtcoef));
if (!p->coef_buf)
goto alloc_fail;
for (level = s->wavelet_depth-1; level >= 0; level--) {