diff options
author | Max Justicz <maxj@mit.edu> | 2017-05-23 12:22:35 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2017-05-23 12:52:29 +0300 |
commit | 3766aa7343c43521c8ad67aaec26e3c91f6d91c7 (patch) | |
tree | 3dca902fa8bada7302b5b6d23c19510eb88c8992 /libavcodec | |
parent | a1652aca7e892ea4899df894feaa87ba4170e06c (diff) |
avcodec/fmvc: Fix use of uninitialized memory when the first frame is not a keyframe
Fixes: fmvc-poc.avi
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/fmvc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c index 2368e95f29..74e9bdd8a0 100644 --- a/libavcodec/fmvc.c +++ b/libavcodec/fmvc.c @@ -596,8 +596,8 @@ static av_cold int decode_init(AVCodecContext *avctx) s->bpp = avctx->bits_per_coded_sample >> 3; s->buffer_size = avctx->width * avctx->height * 4; s->pbuffer_size = avctx->width * avctx->height * 4; - s->buffer = av_malloc(s->buffer_size); - s->pbuffer = av_malloc(s->pbuffer_size); + s->buffer = av_mallocz(s->buffer_size); + s->pbuffer = av_mallocz(s->pbuffer_size); if (!s->buffer || !s->pbuffer) return AVERROR(ENOMEM); |