| OLD | NEW |
| (Empty) | |
| 1 commit cce6158fd963a659b5a2eba4deedacba4e55a540 |
| 2 Author: reimar <reimar@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b> |
| 3 Date: Sun Jul 5 18:27:39 2009 +0000 |
| 4 |
| 5 Ensure that the filter limit values do not exceed the maximum allowed value
of 127. |
| 6 |
| 7 |
| 8 git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19351 9553f0bf-9b14-
0410-a0b8-cfaf0461ba5b |
| 9 |
| 10 diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c |
| 11 index 66ac2f9..ad32cc9 100644 |
| 12 --- a/libavcodec/vp3.c |
| 13 +++ b/libavcodec/vp3.c |
| 14 @@ -2171,8 +2171,13 @@ static int theora_decode_tables(AVCodecContext *avctx, Ge
tBitContext *gb) |
| 15 if (s->theora >= 0x030200) { |
| 16 n = get_bits(gb, 3); |
| 17 /* loop filter limit values table */ |
| 18 - for (i = 0; i < 64; i++) |
| 19 + for (i = 0; i < 64; i++) { |
| 20 s->filter_limit_values[i] = get_bits(gb, n); |
| 21 + if (s->filter_limit_values[i] > 127) { |
| 22 + av_log(avctx, AV_LOG_ERROR, "filter limit value too large (%i >
127), clamping\n", s->filter_limit_values[i]); |
| 23 + s->filter_limit_values[i] = 127; |
| 24 + } |
| 25 + } |
| 26 } |
| 27 |
| 28 if (s->theora >= 0x030200) |
| OLD | NEW |