[FFmpeg-cvslog] avcodec/fic: Check that there is input left in fic_decode_block()
Michael Niedermayer
git at videolan.org
Fri May 10 22:02:19 EEST 2019
ffmpeg | branch: release/3.2 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jan 23 00:30:53 2019 +0100| [20337eb1068049692f0c1f9c8a924ca127cdae77] | committer: Michael Niedermayer
avcodec/fic: Check that there is input left in fic_decode_block()
Fixes: Timeout
Fixes: 12450/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5661984622641152
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 db1c4acd02af4de5dfbea6012c296470679aa7a6)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20337eb1068049692f0c1f9c8a924ca127cdae77
---
libavcodec/fic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/fic.c b/libavcodec/fic.c
index 8c4c4814db..d94b1dba64 100644
--- a/libavcodec/fic.c
+++ b/libavcodec/fic.c
@@ -138,6 +138,9 @@ static int fic_decode_block(FICContext *ctx, GetBitContext *gb,
{
int i, num_coeff;
+ if (get_bits_left(gb) < 8)
+ return AVERROR_INVALIDDATA;
+
/* Is it a skip block? */
if (get_bits1(gb)) {
/* This is a P-frame. */
More information about the ffmpeg-cvslog
mailing list