[FFmpeg-cvslog] avcodec/vp8: Check for bitstream end before vp7_fade_frame()
Michael Niedermayer
git at videolan.org
Sun Feb 18 14:11:28 EET 2018
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Feb 17 04:20:52 2018 +0100| [de675648cef7e451ca82fabaee0d8ec1fe653311] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=de675648cef7e451ca82fabaee0d8ec1fe653311
---
libavcodec/vp8.c | 2 ++
1 file changed, 2 insertions(+)
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)
More information about the ffmpeg-cvslog
mailing list