[FFmpeg-cvslog] avcodec/av1dec: Check tile_cols
Michael Niedermayer
git at videolan.org
Mon Mar 21 23:27:35 EET 2022
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Feb 1 18:42:34 2022 +0100| [4fdfe430c12225e819f68993474bd2f473c7e8b1] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fdfe430c12225e819f68993474bd2f473c7e8b1
---
libavcodec/av1dec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index a274d8867e..613efc5d11 100644
--- a/libavcodec/av1dec.c
+++ b/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;
More information about the ffmpeg-cvslog
mailing list