diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 02:55:19 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 02:55:32 +0100 |
commit | 95d6e5bdd58d5caaa52c57bad1e1d87df59fb7f8 (patch) | |
tree | 2fc396cb5bebf8ea0f2f46ea55993f902a7ec5b2 /libavcodec/vp6.c | |
parent | 640424e080cbff3733706321d05c32eb7c87b90b (diff) | |
parent | bb4b0ad83b13c3af57675e80163f3f333adef96f (diff) | |
download | ffmpeg-95d6e5bdd58d5caaa52c57bad1e1d87df59fb7f8.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
vp5: Fix illegal read.
vp6: Fix illegal read.
tls: Use TLSv1_client_method for OpenSSL
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp6.c')
-rw-r--r-- | libavcodec/vp6.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c index 29fcecdb57..84876b7146 100644 --- a/libavcodec/vp6.c +++ b/libavcodec/vp6.c @@ -442,7 +442,8 @@ static void vp6_parse_coeff(VP56Context *s) model1 = model->coeff_dccv[pt]; model2 = model->coeff_dcct[pt][ctx]; - for (coeff_idx=0; coeff_idx<64; ) { + coeff_idx = 0; + for (;;) { if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) { /* parse a coeff */ if (vp56_rac_get_prob(c, model2[2])) { @@ -483,8 +484,10 @@ static void vp6_parse_coeff(VP56Context *s) run += vp56_rac_get_prob(c, model3[i+8]) << i; } } - - cg = vp6_coeff_groups[coeff_idx+=run]; + coeff_idx += run; + if (coeff_idx >= 64) + break; + cg = vp6_coeff_groups[coeff_idx]; model1 = model2 = model->coeff_ract[pt][ct][cg]; } |