Commit f7eea117 authored by vitor's avatar vitor

Do not read beyond end of input in EA-TGV. This should avoid FATE test #362

result depending on uninitialized data.

FATE result may change for this test.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22082 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4dbb30d6
......@@ -192,6 +192,10 @@ static int tgv_decode_inter(TgvContext * s, const uint8_t *buf, const uint8_t *b
s->block_codebook[i][15-j] = tmp[get_bits(&gb, 2)];
}
if (get_bits_left(&gb) < vector_bits *
(s->avctx->height/4) * (s->avctx->width/4))
return -1;
/* read vectors and build frame */
for(y=0; y<s->avctx->height/4; y++)
for(x=0; x<s->avctx->width/4; x++) {
......
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