[FFmpeg-cvslog] avcodec/bethsoftvideo: Check block_type
Michael Niedermayer
git at videolan.org
Fri May 10 22:02:56 EEST 2019
ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Sun Feb 24 23:39:44 2019 +0100| [4e5a17e79070a95dbc0b4cf05261dc38e084a3bf] | committer: Michael Niedermayer
avcodec/bethsoftvideo: Check block_type
Fixes: Timeout (17 seconds -> 1 second)
Fixes: 13184/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BETHSOFTVID_fuzzer-5711446296494080
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 b8ecadec0582a1521b5d0d253376966138e6ca78)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e5a17e79070a95dbc0b4cf05261dc38e084a3bf
---
libavcodec/bethsoftvideo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 97b745d38a..9fe26e81fa 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -109,6 +109,11 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx,
if(yoffset >= avctx->height)
return AVERROR_INVALIDDATA;
dst += vid->frame->linesize[0] * yoffset;
+ case VIDEO_P_FRAME:
+ case VIDEO_I_FRAME:
+ break;
+ default:
+ return AVERROR_INVALIDDATA;
}
// main code
More information about the ffmpeg-cvslog
mailing list