Mercurial > libavcodec.hg
changeset 9922:ffdd1d32c40c libavcodec
Ensure that the filter limit values do not exceed the maximum allowed value of 127.
author | reimar |
---|---|
date | Sun, 05 Jul 2009 18:27:39 +0000 |
parents | f42402d1778b |
children | ba58c3abf832 |
files | vp3.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/vp3.c Sun Jul 05 18:25:58 2009 +0000 +++ b/vp3.c Sun Jul 05 18:27:39 2009 +0000 @@ -2171,8 +2171,13 @@ 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)