[FFmpeg-cvslog] avcodec/fic: clear slice_data

Michael Niedermayer git at videolan.org
Sat Feb 15 17:29:50 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Feb 15 17:19:59 2014 +0100| [1db8bc56488c888d57f5339812bd6f4117d85c3e] | committer: Michael Niedermayer

avcodec/fic: clear slice_data

Fixes artifacts
Fixes use of freed memory

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1db8bc56488c888d57f5339812bd6f4117d85c3e
---

 libavcodec/fic.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index c4f262d..cb8da1a 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -212,6 +212,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
         av_log(avctx, AV_LOG_ERROR, "Could not allocate slice data.\n");
         return AVERROR(ENOMEM);
     }
+    memset(ctx->slice_data, 0, nslices * sizeof(ctx->slice_data[0]));
 
     for (slice = 0; slice < nslices; slice++) {
         unsigned slice_off = AV_RB32(src + tsize + FIC_HEADER_SIZE + slice * 4);



More information about the ffmpeg-cvslog mailing list