Commit bb284d79 authored by aurel's avatar aurel

vp6dec: ensure we don't try to use a buffer with negative size

this should never happen in valid vp6 bitstream
fix issue684


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@15610 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 9e1ded2b
......@@ -135,6 +135,8 @@ static int vp6_parse_header(vp56_context_t *s, const uint8_t *buf, int buf_size,
if (coeff_offset) {
buf += coeff_offset;
buf_size -= coeff_offset;
if (buf_size < 0)
return 0;
if (s->use_huffman) {
s->parse_coeff = vp6_parse_coeff_huffman;
init_get_bits(&s->gb, buf, buf_size<<3);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment