[FFmpeg-cvslog] avcodec/hq_hqa: Check remaining input bits in hqa_decode_mb()
Michael Niedermayer
git at videolan.org
Tue Nov 20 18:39:39 EET 2018
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Mon Aug 20 22:53:32 2018 +0200| [db39404c1581b16a307ca2089346267a98a28b91] | committer: Michael Niedermayer
avcodec/hq_hqa: Check remaining input bits in hqa_decode_mb()
Fixes: Timeout
Fixes: 9634/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-6267852259590144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit c9222b972d6cbdaf6571cf7ae0a6513bffa5ff9f)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db39404c1581b16a307ca2089346267a98a28b91
---
libavcodec/hq_hqa.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/hq_hqa.c b/libavcodec/hq_hqa.c
index d18464769d..7ae58e0985 100644
--- a/libavcodec/hq_hqa.c
+++ b/libavcodec/hq_hqa.c
@@ -180,6 +180,9 @@ static int hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup,
int flag = 0;
int i, ret, cbp;
+ if (get_bits_left(gb) < 1)
+ return AVERROR_INVALIDDATA;
+
cbp = get_vlc2(gb, c->hqa_cbp_vlc.table, 5, 1);
for (i = 0; i < 12; i++)
More information about the ffmpeg-cvslog
mailing list