[FFmpeg-cvslog] avcodec/scpr: Check for min > max in decompress_p()
Michael Niedermayer
git at videolan.org
Sun Oct 7 23:58:19 EEST 2018
ffmpeg | branch: release/4.0 | Michael Niedermayer <michael at niedermayer.cc> | Sat Aug 4 23:45:52 2018 +0200| [b95c209a6108700a32cb4cdca516f1a36b56134a] | committer: Michael Niedermayer
avcodec/scpr: Check for min > max in decompress_p()
Fixes: Timeout
Fixes: 9342/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-4795990841229312
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 3378194ce8e9a126a7cc6ed57bedde1221790469)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b95c209a6108700a32cb4cdca516f1a36b56134a
---
libavcodec/scpr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index 72f59d5917..d76148998b 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -526,6 +526,9 @@ static int decompress_p(AVCodecContext *avctx,
return ret;
max += temp << 8;
+ if (min > max)
+ return AVERROR_INVALIDDATA;
+
memset(s->blocks, 0, sizeof(*s->blocks) * s->nbcount);
while (min <= max) {
More information about the ffmpeg-cvslog
mailing list