Message ID | 20180624024623.26645-2-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 74af6ae02100ff05f8a09fde5db4cd06509cdfba |
Headers | show |
On Sun, Jun 24, 2018 at 04:46:22AM +0200, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/vp8.c | 3 +++ > 1 file changed, 3 insertions(+) will apply [...]
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 62b9f8bc2d..f6120aa67e 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -505,6 +505,9 @@ static int vp7_fade_frame(VP8Context *s, VP56RangeCoder *c) int beta = (int8_t) vp8_rac_get_uint(c, 8); int ret; + if (c->end <= c->buffer && c->bits >= 0) + return AVERROR_INVALIDDATA; + if (!s->keyframe && (alpha || beta)) { int width = s->mb_width * 16; int height = s->mb_height * 16;
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/vp8.c | 3 +++ 1 file changed, 3 insertions(+)