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

vp3dec: Check coefficient index in vp3_dequant()

Fixes NGS00145

Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-18 18:08:31 +01:00
parent 895d258e9b
commit eef5c35b43

View File

@ -1309,6 +1309,10 @@ static inline int vp3_dequant(Vp3DecodeContext *s, Vp3Fragment *frag,
case 1: // zero run
s->dct_tokens[plane][i]++;
i += (token >> 2) & 0x7f;
if(i>63){
av_log(s->avctx, AV_LOG_ERROR, "Coefficient index overflow\n");
return -1;
}
block[perm[i]] = (token >> 9) * dequantizer[perm[i]];
i++;
break;