[FFmpeg-cvslog] avcodec/svq3: Check for minimum size input
Michael Niedermayer
git at videolan.org
Thu Feb 27 19:07:31 EET 2025
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Sep 22 20:31:58 2024 +0200| [ab42cdfd0ebc97446da28dbf557dae6d0623ecb4] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 050b5e85cbe61414ba9b78f76a04b2488e816f42)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ab42cdfd0ebc97446da28dbf557dae6d0623ecb4
---
libavcodec/svq3.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index 8a67836827..fef0202b79 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -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)
More information about the ffmpeg-cvslog
mailing list