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@niedermayer.cc>
(cherry picked from commit 30a7a81cdc2ee2eac6d3271439c43f11b7327b3e)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -386,6 +386,8 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data, |
386 | 386 |
slice_h = FFALIGN(avctx->height - ctx->slice_h * (nslices - 1), 16); |
387 | 387 |
} else { |
388 | 388 |
slice_size = AV_RB32(src + tsize + FIC_HEADER_SIZE + slice * 4 + 4); |
389 |
+ if (slice_size < slice_off) |
|
390 |
+ return AVERROR_INVALIDDATA; |
|
389 | 391 |
} |
390 | 392 |
|
391 | 393 |
if (slice_size < slice_off || slice_size > msize) |