mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vp6: Fix illegal read.
Found with Address Sanitizer Signed-off-by: Alex Converse <alex.converse@gmail.com>
This commit is contained in:
parent
92db95e9ca
commit
e0966eb140
@ -442,7 +442,8 @@ static void vp6_parse_coeff(VP56Context *s)
|
|||||||
model1 = model->coeff_dccv[pt];
|
model1 = model->coeff_dccv[pt];
|
||||||
model2 = model->coeff_dcct[pt][ctx];
|
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])) {
|
if ((coeff_idx>1 && ct==0) || vp56_rac_get_prob(c, model2[0])) {
|
||||||
/* parse a coeff */
|
/* parse a coeff */
|
||||||
if (vp56_rac_get_prob(c, model2[2])) {
|
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;
|
run += vp56_rac_get_prob(c, model3[i+8]) << i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
coeff_idx += run;
|
||||||
cg = vp6_coeff_groups[coeff_idx+=run];
|
if (coeff_idx >= 64)
|
||||||
|
break;
|
||||||
|
cg = vp6_coeff_groups[coeff_idx];
|
||||||
model1 = model2 = model->coeff_ract[pt][ct][cg];
|
model1 = model2 = model->coeff_ract[pt][ct][cg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user