aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2024-04-27 19:38:13 -0300
committerJames Almer <jamrial@gmail.com>2024-04-27 19:39:23 -0300
commit31327c2d075a413749c1461c06382993b9bba90e (patch)
tree0dbce9308e038fed5c94a20148353900ae01b836 /libavformat/mov.c
parent59767636c77fa9014587c3084bbc210f65a5cd2a (diff)
downloadffmpeg-31327c2d075a413749c1461c06382993b9bba90e.tar.gz
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@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index ecd29a7d08..ede25d3342 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -9440,7 +9440,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);