[FFmpeg-devel] [PATCH 2/2] avcodec/scpr: Check for min > max in decompress_p()
Michael Niedermayer
michael at niedermayer.cc
Sun Aug 5 04:16:42 EEST 2018
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>
---
libavcodec/scpr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index 72f59d5917..d1e47b09ac 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -525,6 +525,9 @@ static int decompress_p(AVCodecContext *avctx,
if (ret < 0)
return ret;
+ if (min > max)
+ return AVERROR_INVALIDDATA;
+
max += temp << 8;
memset(s->blocks, 0, sizeof(*s->blocks) * s->nbcount);
--
2.18.0
More information about the ffmpeg-devel
mailing list