aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/fic.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-15 17:19:59 +0100
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-04-21 14:56:17 -0400
commit144f7a561d32ae9bc657a217e2b4c6dd9a0d7df9 (patch)
treea91be049c82c7801e5b2816b1284857535f35c71 /libavcodec/fic.c
parentf34d3173fcfc7f3228095d509a64c4fa4b37b575 (diff)
downloadffmpeg-144f7a561d32ae9bc657a217e2b4c6dd9a0d7df9.tar.gz
avcodec/fic: clear slice_data
Fixes artifacts Fixes use of freed memory Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/fic.c')
-rw-r--r--libavcodec/fic.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 9453941b76..1dfa02d222 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -261,6 +261,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);