1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Fix invalid reads in VC1 decoder

Patch discussed and taken from https://roundup.ffmpeg.org/issue2584
This commit is contained in:
Reimar Döffinger 2011-02-19 11:33:01 +01:00 committed by Reinhard Tartler
parent a89f4ca005
commit 2bbec1eda4

View File

@ -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 {