# HG changeset patch # User vitor # Date 1267207947 0 # Node ID b0cb1f7efcbcb62a75b79bc82395d5426af6e8fa # Parent 090fcf7610e8c04bbfdd9b8c60215060b7a72a5e 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. diff -r 090fcf7610e8 -r b0cb1f7efcbc eatgv.c --- 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; yavctx->height/4; y++) for(x=0; xavctx->width/4; x++) {