avcodec/vp3: Check input amount in theora_decode_header()
Fixes: Timeout
Fixes: 29226/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_THEORA_fuzzer-6195092572471296
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 869fe41d10)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9b43c8d34a
commit
cd64495084
1 changed files with 3 additions and 0 deletions
|
|
@ -2273,6 +2273,9 @@ static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb)
|
|||
int ret;
|
||||
AVRational fps, aspect;
|
||||
|
||||
if (get_bits_left(gb) < 206)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
s->theora_header = 0;
|
||||
s->theora = get_bits_long(gb, 24);
|
||||
av_log(avctx, AV_LOG_DEBUG, "Theora bitstream version %X\n", s->theora);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue