1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

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/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5ffb8e8793)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2019-07-28 22:29:57 +02:00
parent 2a43d9f882
commit b4edee5cab

View File

@ -131,6 +131,9 @@ static int tqi_decode_frame(AVCodecContext *avctx,
AVFrame *frame = data;
int ret, w, h;
if (buf_size < 12)
return AVERROR_INVALIDDATA;
t->avctx = avctx;
w = AV_RL16(&buf[0]);