[FFmpeg-cvslog] avcodec/fic: Fail on invalid slice size/off
Michael Niedermayer
git at videolan.org
Tue Jan 15 02:18:51 EET 2019
ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Sun Dec 16 21:43:07 2018 +0100| [6e5238d55f2e96fd3f7cc10891794273574c471a] | committer: Michael Niedermayer
avcodec/fic: Fail on invalid slice size/off
Fixes: Timeout
Fixes: 11486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5677133863583744
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 30a7a81cdc2ee2eac6d3271439c43f11b7327b3e)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e5238d55f2e96fd3f7cc10891794273574c471a
---
libavcodec/fic.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 7de13acfa5..8c4c4814db 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -386,6 +386,8 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
slice_h = FFALIGN(avctx->height - ctx->slice_h * (nslices - 1), 16);
} else {
slice_size = AV_RB32(src + tsize + FIC_HEADER_SIZE + slice * 4 + 4);
+ if (slice_size < slice_off)
+ return AVERROR_INVALIDDATA;
}
if (slice_size < slice_off || slice_size > msize)
More information about the ffmpeg-cvslog
mailing list