avcodec/vp8: Check bitstream input in vp7_fade_frame() before time consuming operation

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/296/head
Michael Niedermayer 7 years ago
parent 09f0429b99
commit 74af6ae021
  1. 3
      libavcodec/vp8.c

@ -507,6 +507,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;

Loading…
Cancel
Save