diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-02-24 23:39:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-24 10:38:51 +0100 |
commit | 6abc6acd50ae02e0e9d77557fab53a665c46aeb9 (patch) | |
tree | 96d51b1dd90ed841e40e535b8ead26a9944b0347 | |
parent | 7a25b3192de6f91e2ae721ede46f6a5a2f48a550 (diff) | |
download | ffmpeg-6abc6acd50ae02e0e9d77557fab53a665c46aeb9.tar.gz |
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@niedermayer.cc>
(cherry picked from commit b8ecadec0582a1521b5d0d253376966138e6ca78)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/bethsoftvideo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c index 274516bf4d..e5a73f55a1 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 |