[FFmpeg-devel] [PATCH 1/5] avformat/mov: Check that sample_count is allocated in mov_parse_heif_items()
Michael Niedermayer
michael at niedermayer.cc
Sun Jun 22 00:15:17 EEST 2025
Fixes: NULL pointer dereference
Fixes: 416811958/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5425269114732544
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8a094b1ea0a..6e9e3498fb5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -10336,7 +10336,7 @@ static int mov_parse_heif_items(AVFormatContext *s)
st->codecpar->height = item->height;
err = sanity_checks(s, sc, item->item_id);
- if (err)
+ if (err || !sc->sample_count)
return AVERROR_INVALIDDATA;
sc->sample_sizes[0] = item->extent_length;
--
2.49.0
More information about the ffmpeg-devel
mailing list