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>2018-02-17 06:20:52 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-02-17 22:31:39 +0300
commitde675648cef7e451ca82fabaee0d8ec1fe653311 (patch)
treef7ceb34d01651bad2c544d24320cba3852e96b3f /libavcodec/vp8.c
parentdd8351b1184b8054925c28ecc5fcb6dbbc177fad (diff)
avcodec/vp8: Check for bitstream end before vp7_fade_frame()
Fixes: Timeout Fixes: 5653/clusterfuzz-testcase-5497680018014208 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 7f71a75e4b..62b9f8bc2d 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -656,6 +656,8 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
s->fade_present = vp8_rac_get(c);
}
+ if (c->end <= c->buffer && c->bits >= 0)
+ return AVERROR_INVALIDDATA;
/* E. Fading information for previous frame */
if (s->fade_present && vp8_rac_get(c)) {
if ((ret = vp7_fade_frame(s ,c)) < 0)