diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-26 13:20:59 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-26 13:42:04 +0200 |
commit | 2d221d9e069e6269cb41f3678f2734800171d87b (patch) | |
tree | 52897af4de8be51ee9551a6e837a66a87fdc6dbe /libavcodec | |
parent | 10bbf6cf622f8a954c6cc694ca07c24f989c99af (diff) | |
download | ffmpeg-2d221d9e069e6269cb41f3678f2734800171d87b.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>
Diffstat (limited to 'libavcodec')
-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 2a1fc0d9d6..662ef13fff 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; } |