Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-08-02 22:23:18 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2019-08-04 22:16:28 +0300
commit44119e5ad6ca560ca6a1d35d250ad06604467145 (patch)
treeccf74ce5ecea17a2e2081e9f58f8569769ce4bb9 /libavcodec/vp3.c
parent7821480db5e378ccd827e1445aba7346cde60784 (diff)
avcodec/vp3: Check for end of input in vp4_unpack_vlcs()
Fixes: Timeout (too long -> 1sec) Fixes: 15232/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP3_fuzzer-5769583086010368 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross <pross@xvid.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 58c7f419ce757c3c741d6071e0dafcba7d875567) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 6ce901eda9..28ed0461c7 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1403,6 +1403,8 @@ static int vp4_unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
int eob_run;
while (!eob_tracker[coeff_i]) {
+ if (get_bits_left(gb) < 1)
+ return AVERROR_INVALIDDATA;
token = get_vlc2(gb, vlc_tables[coeff_i]->table, 11, 3);