[FFmpeg-cvslog] avcodec/scpr: Skip frames which change nothing
Michael Niedermayer
git at videolan.org
Sun Sep 30 23:25:37 EEST 2018
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Sep 25 02:36:35 2018 +0200| [d702769213487923c0fb0abe4b61f4d9ebddb88b] | committer: Michael Niedermayer
avcodec/scpr: Skip frames which change nothing
Fixes: Timeout
Fixes: 10292/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCPR_fuzzer-5687943864254464
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d702769213487923c0fb0abe4b61f4d9ebddb88b
---
libavcodec/scpr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/scpr.c b/libavcodec/scpr.c
index 81597aa4dc..e41fbbec13 100644
--- a/libavcodec/scpr.c
+++ b/libavcodec/scpr.c
@@ -516,7 +516,7 @@ static int decompress_p(AVCodecContext *avctx,
int backstep = linesize - avctx->width;
if (bytestream2_get_byte(gb) == 0)
- return 0;
+ return 1;
bytestream2_skip(gb, 1);
init_rangecoder(&s->rc, gb);
@@ -813,6 +813,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
s->current_frame->linesize[0] / 4,
(uint32_t *)s->last_frame->data[0],
s->last_frame->linesize[0] / 4);
+ if (ret == 1)
+ return avpkt->size;
} else {
return AVERROR_PATCHWELCOME;
}
More information about the ffmpeg-cvslog
mailing list