Merge commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b'

* commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b':
  vp7: bound checking in vp7_decode_frame_header

Only partially merged, see 46f72ea507

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
This commit is contained in:
Hendrik Leppkes 2015-08-18 09:14:08 +02:00
commit 983fa5a1a9

View File

@ -493,6 +493,10 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si
int width = s->avctx->width;
int height = s->avctx->height;
if (buf_size < 4) {
return AVERROR_INVALIDDATA;
}
s->profile = (buf[0] >> 1) & 7;
if (s->profile > 1) {
avpriv_request_sample(s->avctx, "Unknown profile %d", s->profile);