Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-09-14 21:31:39 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-09 19:34:49 +0300
commit7f8a534e56128c011a1f1d9668f7885a95c5bd03 (patch)
tree2c89caa92d21c2e845745a5e96ede59ad94706a2 /libavcodec
parent22181868e3ef29a99b4ad4d7c0a1aa6fe022c6ff (diff)
avcodec/flicvideo: Check remaining bytes in FLI*COPY
Fixes: Timeout Fixes: 37795/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-4846536543043584 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 5f835efbca874ad42cb954e6788588f52a57a7a2) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/flicvideo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index bf8ffeba4f..bf095f7461 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -735,6 +735,8 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
bytestream2_skip(&g2, chunk_size - 6);
} else {
+ if (bytestream2_get_bytes_left(&g2) < 2 * s->avctx->width * s->avctx->height )
+ return AVERROR_INVALIDDATA;
for (y_ptr = 0; y_ptr < s->frame->linesize[0] * s->avctx->height;
y_ptr += s->frame->linesize[0]) {