diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-26 13:20:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-10-08 13:15:42 +0200 |
commit | 837113ab5fffe48dda62128d804ef8e1ca0c13a6 (patch) | |
tree | e361f7594754cc10ce9bb3bfebd39522eea9b33f | |
parent | 97340bdfa3913f991960060a18824ea7df4fc081 (diff) | |
download | ffmpeg-837113ab5fffe48dda62128d804ef8e1ca0c13a6.tar.gz |
avcodec/ffv1dec: Fix off by 1 error in quant_table_count check
Fixes: invalid_read.nut
Found-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d221d9e069e6269cb41f3678f2734800171d87b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/ffv1dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 93d728a2a5..b24aa0fa2a 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -305,7 +305,7 @@ static int decode_slice_header(FFV1Context *f, FFV1Context *fs) for (i = 0; i < f->plane_count; i++) { PlaneContext * const p = &fs->plane[i]; int idx = get_symbol(c, state, 0); - if (idx > (unsigned)f->quant_table_count) { + if (idx >= (unsigned)f->quant_table_count) { av_log(f->avctx, AV_LOG_ERROR, "quant_table_index out of range\n"); return -1; } |