aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-15 17:19:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-15 17:19:59 +0100
commit1db8bc56488c888d57f5339812bd6f4117d85c3e (patch)
tree43536b5d3f8f82acafef4fe3123f097a1f765e98
parentd46ef40129487143f2fa4e0b44b3f5e788c4fcb2 (diff)
downloadffmpeg-1db8bc56488c888d57f5339812bd6f4117d85c3e.tar.gz
avcodec/fic: clear slice_data
Fixes artifacts Fixes use of freed memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/fic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index c4f262da6a..cb8da1a2e2 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);