git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50ff78d
)
Do not read beyond end of input in EA-TGV. This should avoid FATE test #362
author
Vitor Sessak
<vitor1001@gmail.com>
Fri, 26 Feb 2010 18:12:27 +0000
(18:12 +0000)
committer
Vitor Sessak
<vitor1001@gmail.com>
Fri, 26 Feb 2010 18:12:27 +0000
(18:12 +0000)
result depending on uninitialized data.
FATE result may change for this test.
Originally committed as revision 22082 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/eatgv.c
patch
|
blob
|
history
diff --git
a/libavcodec/eatgv.c
b/libavcodec/eatgv.c
index
bfaf2d4
..
5eb31b7
100644
(file)
--- a/
libavcodec/eatgv.c
+++ b/
libavcodec/eatgv.c
@@
-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++) {