[FFmpeg-cvslog] avformat/mov: fix the check for the heif item parsing loop
James Almer
git at videolan.org
Mon Apr 29 15:33:51 EEST 2024
ffmpeg | branch: release/7.0 | James Almer <jamrial at gmail.com> | Sat Apr 27 19:38:13 2024 -0300| [64a048d4cc0a2806c29348012165dea0c6a08613] | committer: James Almer
avformat/mov: fix the check for the heif item parsing loop
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: James Almer <jamrial at gmail.com>
(cherry picked from commit 31327c2d075a413749c1461c06382993b9bba90e)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64a048d4cc0a2806c29348012165dea0c6a08613
---
libavformat/mov.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index d9009f2eab..9291195a8f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -9427,7 +9427,8 @@ static int mov_parse_tiles(AVFormatContext *s)
break;
}
- if (k == grid->nb_tiles) {
+ if (k == mov->nb_heif_item) {
+ av_assert0(loop);
av_log(s, AV_LOG_WARNING, "HEIF item id %d referenced by grid id %d doesn't "
"exist\n",
tile_id, grid->item->item_id);
More information about the ffmpeg-cvslog
mailing list