Mercurial > libavcodec.hg
diff eatgv.c @ 11303:b0cb1f7efcbc libavcodec
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.
author | vitor |
---|---|
date | Fri, 26 Feb 2010 18:12:27 +0000 |
parents | dff431441c9c |
children | 8a4984c5cacc |
line wrap: on
line diff
--- a/eatgv.c Fri Feb 26 15:26:11 2010 +0000 +++ b/eatgv.c Fri Feb 26 18:12:27 2010 +0000 @@ -192,6 +192,10 @@ 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++) {