[FFmpeg-cvslog] avcodec/vp3: Check eob_run
Michael Niedermayer
git at videolan.org
Mon Feb 19 16:36:06 EET 2018
ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb 9 04:17:16 2018 +0100| [c6b5e80635ee1c822eff5adfc3ed3904ba70c206] | committer: Michael Niedermayer
avcodec/vp3: Check eob_run
Fixes: out of array access
Fixes: 5919/clusterfuzz-testcase-minimized-5859311382167552
Fixes: special case for theora (untested due to lack of sample)
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 570023eab3e2962b4ad8345a157c1e18ca1a6eca)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c6b5e80635ee1c822eff5adfc3ed3904ba70c206
---
libavcodec/vp3.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index ea80c0e2b1..819239b8e8 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -978,6 +978,9 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
if (eob_run_get_bits[token])
eob_run += get_bits(gb, eob_run_get_bits[token]);
+ if (!eob_run)
+ eob_run = INT_MAX;
+
// record only the number of blocks ended in this plane,
// any spill will be recorded in the next plane.
if (eob_run > num_coeffs - coeff_i) {
More information about the ffmpeg-cvslog
mailing list