[FFmpeg-devel] [PATCH 1/6] avformat/mov: Check tile_item_list
Michael Niedermayer
michael at niedermayer.cc
Fri Apr 26 06:08:34 EEST 2024
Fixes: Null pointer dereference
Fixes: 67861/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5352628142800896
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/mov.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index ecd29a7d08b..97a24e6737e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -9289,6 +9289,9 @@ static int read_image_grid(AVFormatContext *s, const HEIFGrid *grid,
if (tile_grid->nb_tiles != size)
return AVERROR_INVALIDDATA;
+ for (int i = 0; i < size; i++)
+ if (!grid->tile_item_list[i])
+ return AVERROR_INVALIDDATA;
for (int i = 0; i < tile_cols; i++)
tile_grid->coded_width += grid->tile_item_list[i]->width;
for (int i = 0; i < size; i += tile_cols)
--
2.43.2
More information about the ffmpeg-devel
mailing list