Fixes: assertion failure Fixes: 28447/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5369575948550144
Unified · Split
| @@ -786,7 +786,7 @@ static int read_header(FFV1Context *f) · 785 unmodified lines | |||
| 786 | 786 | ||
| 787 | if (f->version == 2) { | 787 | if (f->version == 2) { |
| 788 | int idx = get_symbol(c, state, 0); | 788 | int idx = get_symbol(c, state, 0); |
| 789 | if (idx > (unsigned)f->quant_table_count) { | 789 | if (idx >= (unsigned)f->quant_table_count) { |
| 790 | av_log(f->avctx, AV_LOG_ERROR, | 790 | av_log(f->avctx, AV_LOG_ERROR, |
| 791 | "quant_table_index out of range\n"); | 791 | "quant_table_index out of range\n"); |
| 792 | return AVERROR_INVALIDDATA; | 792 | return AVERROR_INVALIDDATA; |