avcodec/av1dec: Check tile_cols

Fixes: division by zero
Fixes: 43769/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5392562205097984
Fixes: 43950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AV1_fuzzer-5769210217758720

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/5.1
Michael Niedermayer 3 years ago
parent 6bab6afecc
commit 4fdfe430c1
  1. 3
      libavcodec/av1dec.c

@ -398,6 +398,9 @@ static int get_tiles_info(AVCodecContext *avctx, const AV1RawTileGroup *tile_gro
s->tg_start = tile_group->tg_start;
s->tg_end = tile_group->tg_end;
if (s->raw_frame_header->tile_cols == 0)
return AVERROR_INVALIDDATA;
for (tile_num = tile_group->tg_start; tile_num <= tile_group->tg_end; tile_num++) {
tile_row = tile_num / s->raw_frame_header->tile_cols;
tile_col = tile_num % s->raw_frame_header->tile_cols;

Loading…
Cancel
Save