summaryrefslogtreecommitdiff
path: root/libavcodec/vp6.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-04 01:44:06 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-04 01:44:06 +0100
commit259a960f1b74339626f8da890cc261a4043097fe (patch)
treeaea69b2dcfe4dfabedf82725fecbd2a551412f55 /libavcodec/vp6.c
parentbb99ae3ae924c942a634bec7711ec7ee11c38eb9 (diff)
parent2a6eb06254df79e96b3d791b6b89b2534ced3119 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vp6: Fix illegal read. avfilter: Don't copy garbage from the stack when setting up video pictures. avcodec: Make sure codec_type is set by avcodec_get_context_defaults2 avcodec: Remove a misplaced and useless attribute_deprecated avconv: add -dump_attachment option. avconv: add -attach option. avconv: make negative mappings disable only streams from the specified file fmtconvert: fix int32_to_float_fmul_scalar() for windows x86_64 Conflicts: libavcodec/options.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp6.c')
-rw-r--r--libavcodec/vp6.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index a95e4be5b2..29fcecdb57 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -376,7 +376,7 @@ static void vp6_parse_coeff_huffman(VP56Context *s)
if (b > 3) pt = 1;
vlc_coeff = &s->dccv_vlc[pt];
- for (coeff_idx=0; coeff_idx<64; ) {
+ for (coeff_idx = 0;;) {
int run = 1;
if (coeff_idx<2 && s->nb_null[coeff_idx][pt]) {
s->nb_null[coeff_idx][pt]--;
@@ -413,6 +413,8 @@ static void vp6_parse_coeff_huffman(VP56Context *s)
}
}
coeff_idx+=run;
+ if (coeff_idx >= 64)
+ break;
cg = FFMIN(vp6_coeff_groups[coeff_idx], 3);
vlc_coeff = &s->ract_vlc[pt][ct][cg];
}