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

tscc2: Fix an out of array access

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Michael Niedermayer 2012-10-12 02:26:50 +02:00 committed by Martin Storsjö
parent 2f1b2ff934
commit c80b59f679

View File

@ -173,7 +173,7 @@ static int tscc2_decode_mb(TSCC2Context *c, int *q, int vlc_set,
if (ac == 0x1000)
ac = get_bits(gb, 12);
bpos += ac & 0xF;
if (bpos >= 64)
if (bpos >= 16)
return AVERROR_INVALIDDATA;
val = sign_extend(ac >> 4, 8);
c->block[tscc2_zigzag[bpos++]] = val;