diff options
author | Pascal Massimino <pascal.massimino@gmail.com> | 2010-08-01 23:20:06 +0000 |
---|---|---|
committer | Pascal Massimino <pascal.massimino@gmail.com> | 2010-08-01 23:20:06 +0000 |
commit | c22b4468a6e87ccaf1630d83f12f6817f9e7eff7 (patch) | |
tree | bdfa057b22fcd430d1ecd53f3ebc83976304c23b /libavcodec/vp8.c | |
parent | 043076975fbf9b7ae5601fa889be1276dc0d8ba9 (diff) | |
download | ffmpeg-c22b4468a6e87ccaf1630d83f12f6817f9e7eff7.tar.gz |
prevent access to vp8_coeff_band[16]
Originally committed as revision 24656 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 1136f38a86..c82c36bca6 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -822,11 +822,11 @@ static int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16], skip_eob: if (!vp56_rac_get_prob_branchy(c, token_prob[1])) { // DCT_0 + if (++i == 16) + return nonzero; // invalid input; blocks should end with EOB zero_nhood = 0; - token_prob = probs[vp8_coeff_band[++i]][0]; - if (i < 16) - goto skip_eob; - return nonzero; // invalid input; blocks should end with EOB + token_prob = probs[vp8_coeff_band[i]][0]; + goto skip_eob; } if (!vp56_rac_get_prob_branchy(c, token_prob[2])) { // DCT_1 |