mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-25 00:10:00 +01:00
avcodec/svq3: Check for minimum size input
Fixes: Timeout
Fixes: 71295/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SVQ3_fuzzer-4999941125111808
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 050b5e85cb)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1439,6 +1439,9 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (svq3_decode_slice_header(avctx))
|
||||
return -1;
|
||||
|
||||
if (avpkt->size < s->mb_width * s->mb_height / 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
s->pict_type = s->slice_type;
|
||||
|
||||
if (s->pict_type != AV_PICTURE_TYPE_B)
|
||||
|
||||
Reference in New Issue
Block a user