Fixes: 5540/clusterfuzz-testcase-minimized-6122458273808384
Found-by: continuous fuzzing process
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <[email protected]>
---
libavcodec/scpr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index cbe1bc40d9..ad6073dbf0 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -681,6 +681,8 @@ static int decompress_p(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
if (bx == 0) {
+ if (by < 2)
+ return AVERROR_INVALIDDATA;
z = backstep;
} else {
z = 0;
@@ -710,6 +712,8 @@ static int decompress_p(AVCodecContext *avctx,
return AVERROR_INVALIDDATA;
if (bx == 0) {
+ if (by < 2)
+ return AVERROR_INVALIDDATA;
z = backstep;
} else {
z = 0;
--
2.16.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel