Commit 5ffb8e87 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/eatqi: Check for minimum frame size

The minimum header is 8 bytes, the smallest bitstream that is passed to
the MB decode code is 4 bytes

Fixes: Timeout (35sec -> 18sec)
Fixes: 15800/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EATQI_fuzzer-5684154517159936

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegReviewed-by: 's avatarPaul B Mahol <onemda@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 009ec8dc
...@@ -131,6 +131,9 @@ static int tqi_decode_frame(AVCodecContext *avctx, ...@@ -131,6 +131,9 @@ static int tqi_decode_frame(AVCodecContext *avctx,
AVFrame *frame = data; AVFrame *frame = data;
int ret, w, h; int ret, w, h;
if (buf_size < 12)
return AVERROR_INVALIDDATA;
t->avctx = avctx; t->avctx = avctx;
w = AV_RL16(&buf[0]); w = AV_RL16(&buf[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment