aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-08-18 09:14:08 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-08-18 09:14:08 +0200
commit983fa5a1a922b5436befd26cc1b301a35c5765d8 (patch)
tree301229219794cd25b94e1bc877bea506b7bdb40e /libavcodec
parente721cb8d8b5c64c4d9786928f6c629cb93611d74 (diff)
parent7bf9647264308d2df74b2b50669f2d02a7ecc90b (diff)
downloadffmpeg-983fa5a1a922b5436befd26cc1b301a35c5765d8.tar.gz
Merge commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b'
* commit '7bf9647264308d2df74b2b50669f2d02a7ecc90b': vp7: bound checking in vp7_decode_frame_header Only partially merged, see 46f72ea507afee6adb0d2324848159063d0e7afc Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp8.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 4328f40308..730871a12d 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -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);