Mercurial > libavcodec.hg
comparison vp8.c @ 12335:3ce688a83319 libavcodec
prevent access to vp8_coeff_band[16]
author | skal |
---|---|
date | Sun, 01 Aug 2010 23:20:06 +0000 |
parents | 2a09b276db12 |
children | e84378ff89ca |
comparison
equal
deleted
inserted
replaced
12334:435319d67bd8 | 12335:3ce688a83319 |
---|---|
820 if (!vp56_rac_get_prob_branchy(c, token_prob[0])) // DCT_EOB | 820 if (!vp56_rac_get_prob_branchy(c, token_prob[0])) // DCT_EOB |
821 return nonzero; | 821 return nonzero; |
822 | 822 |
823 skip_eob: | 823 skip_eob: |
824 if (!vp56_rac_get_prob_branchy(c, token_prob[1])) { // DCT_0 | 824 if (!vp56_rac_get_prob_branchy(c, token_prob[1])) { // DCT_0 |
825 if (++i == 16) | |
826 return nonzero; // invalid input; blocks should end with EOB | |
825 zero_nhood = 0; | 827 zero_nhood = 0; |
826 token_prob = probs[vp8_coeff_band[++i]][0]; | 828 token_prob = probs[vp8_coeff_band[i]][0]; |
827 if (i < 16) | 829 goto skip_eob; |
828 goto skip_eob; | |
829 return nonzero; // invalid input; blocks should end with EOB | |
830 } | 830 } |
831 | 831 |
832 if (!vp56_rac_get_prob_branchy(c, token_prob[2])) { // DCT_1 | 832 if (!vp56_rac_get_prob_branchy(c, token_prob[2])) { // DCT_1 |
833 coeff = 1; | 833 coeff = 1; |
834 zero_nhood = 1; | 834 zero_nhood = 1; |