mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-17 12:30:11 +01:00
avcodec/ffv1dec: Fix off by 1 error with quant tables
Fixes: assertion failure
Fixes: 28447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5369575948550144
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5cae71d2b7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -789,7 +789,7 @@ static int read_header(FFV1Context *f)
|
|||||||
|
|
||||||
if (f->version == 2) {
|
if (f->version == 2) {
|
||||||
int idx = get_symbol(c, state, 0);
|
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,
|
av_log(f->avctx, AV_LOG_ERROR,
|
||||||
"quant_table_index out of range\n");
|
"quant_table_index out of range\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
|||||||
Reference in New Issue
Block a user