Commit c22b4468 authored by Pascal Massimino's avatar Pascal Massimino

prevent access to vp8_coeff_band[16]

Originally committed as revision 24656 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 04307697
...@@ -822,11 +822,11 @@ static int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16], ...@@ -822,11 +822,11 @@ static int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16],
skip_eob: skip_eob:
if (!vp56_rac_get_prob_branchy(c, token_prob[1])) { // DCT_0 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; zero_nhood = 0;
token_prob = probs[vp8_coeff_band[++i]][0]; token_prob = probs[vp8_coeff_band[i]][0];
if (i < 16) goto skip_eob;
goto skip_eob;
return nonzero; // invalid input; blocks should end with EOB
} }
if (!vp56_rac_get_prob_branchy(c, token_prob[2])) { // DCT_1 if (!vp56_rac_get_prob_branchy(c, token_prob[2])) { // DCT_1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment