[FFmpeg-cvslog] avcodec/eatqi: Check for minimum frame size

Michael Niedermayer git at videolan.org
Sun Aug 4 22:18:55 EEST 2019


ffmpeg | branch: release/4.2 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jul 28 22:29:57 2019 +0200| [8a03611020b95fed211a4fe93fc06798015698dc] | committer: 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/ffmpeg
Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 5ffb8e879389fb0642654e3233cfeca1f9841e52)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8a03611020b95fed211a4fe93fc06798015698dc
---

 libavcodec/eatqi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 0002d45457..96536b1a08 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -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]);



More information about the ffmpeg-cvslog mailing list