diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-18 18:08:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-21 16:39:34 +0100 |
commit | eef5c35b4352ec49ca41f6198bee8a976b1f81e5 (patch) | |
tree | 4b0243141d072cc1eb3194cd650e706b7b27d640 | |
parent | 895d258e9ba065d035dd30dbc622423031f0185c (diff) | |
download | ffmpeg-eef5c35b4352ec49ca41f6198bee8a976b1f81e5.tar.gz |
vp3dec: Check coefficient index in vp3_dequant()
Fixes NGS00145
Found-by: Phillip Langlois
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/vp3.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 23db9b9034..83ec4d80f0 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -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; |