diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-07-05 18:27:39 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2009-07-05 18:27:39 +0000 |
commit | e13cca4b148fed8a9484d36898621ed68892707a (patch) | |
tree | 21fe9b2205696d4d758a6724cf3066f7838bf888 /libavcodec/vp3.c | |
parent | 7fa5f9990b17051b2c21745be5e63904ba61d90a (diff) | |
download | ffmpeg-e13cca4b148fed8a9484d36898621ed68892707a.tar.gz |
Ensure that the filter limit values do not exceed the maximum allowed value of 127.
Originally committed as revision 19351 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 66ac2f9a07..ad32cc9c1f 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2171,8 +2171,13 @@ static int theora_decode_tables(AVCodecContext *avctx, GetBitContext *gb) if (s->theora >= 0x030200) { n = get_bits(gb, 3); /* loop filter limit values table */ - for (i = 0; i < 64; i++) + for (i = 0; i < 64; i++) { s->filter_limit_values[i] = get_bits(gb, n); + if (s->filter_limit_values[i] > 127) { + av_log(avctx, AV_LOG_ERROR, "filter limit value too large (%i > 127), clamping\n", s->filter_limit_values[i]); + s->filter_limit_values[i] = 127; + } + } } if (s->theora >= 0x030200) |