[FFmpeg-cvslog] vc2enc: fix segfault
Rostislav Pehlivanov
git at videolan.org
Mon Mar 21 12:06:52 CET 2016
ffmpeg | branch: master | Rostislav Pehlivanov <atomnuker at gmail.com> | Mon Mar 21 11:01:01 2016 +0000| [500dc20deede02f25c395351743aeb69f618fd46] | committer: Rostislav Pehlivanov
vc2enc: fix segfault
Fixes trac bug #5353
Uninitialized memory for the initial quantization index
Signed-off-by: Rostislav Pehlivanov <atomnuker at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=500dc20deede02f25c395351743aeb69f618fd46
---
libavcodec/vc2enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c
index f110dfc..7055d1f 100644
--- a/libavcodec/vc2enc.c
+++ b/libavcodec/vc2enc.c
@@ -1182,7 +1182,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx)
s->num_x = s->plane[0].dwt_width/s->slice_width;
s->num_y = s->plane[0].dwt_height/s->slice_height;
- s->slice_args = av_malloc(s->num_x*s->num_y*sizeof(SliceArgs));
+ s->slice_args = av_calloc(s->num_x*s->num_y, sizeof(SliceArgs));
if (!s->slice_args)
goto alloc_fail;
More information about the ffmpeg-cvslog
mailing list