diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2011-02-19 11:33:01 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-02-19 11:33:01 +0100 |
commit | 2bbec1eda46d907605772a8b6e8263caa4bc4c82 (patch) | |
tree | c271c9538de9ad54892c96023e84b8236dbf7d48 /libavcodec | |
parent | a89f4ca005efa5ee82089583c7b8bc00bcee816a (diff) | |
download | ffmpeg-2bbec1eda46d907605772a8b6e8263caa4bc4c82.tar.gz |
Fix invalid reads in VC1 decoder
Patch discussed and taken from https://roundup.ffmpeg.org/issue2584
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vc1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 6707cdec71..7eb9576c69 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1376,7 +1376,7 @@ static void vc1_decode_ac_coeff(VC1Context *v, int *last, int *skip, int *value, if (index != vc1_ac_sizes[codingset] - 1) { run = vc1_index_decode_table[codingset][index][0]; level = vc1_index_decode_table[codingset][index][1]; - lst = index >= vc1_last_decode_table[codingset]; + lst = index >= vc1_last_decode_table[codingset] || get_bits_left(gb) < 0; if(get_bits1(gb)) level = -level; } else { |