[FFmpeg-cvslog] avcodec/scpr: Check for min > max in decompress_p()
Michael Niedermayer
git at videolan.org
Sun Oct 28 03:56:12 EEST 2018
ffmpeg | branch: release/3.4 | Michael Niedermayer <michael at niedermayer.cc> | Sat Aug 4 23:45:52 2018 +0200| [007da8396fedde3a3fb8c99cb7c7aaa46cdec1c9] | 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=007da8396fedde3a3fb8c99cb7c7aaa46cdec1c9
---
libavcodec/scpr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index ad6073dbf0..66b4157576 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -522,6 +522,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