[FFmpeg-devel] [PATCH 5/8] avformat/mov: Check that sample_sizes is allocated in mov_parse_heif_items()

Michael Niedermayer michael at niedermayer.cc
Fri Jun 20 03:32:52 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 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 8a094b1ea0a..22488b517cb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -10332,6 +10332,9 @@ static int mov_parse_heif_items(AVFormatContext *s)
 
         st = item->st;
         sc = st->priv_data;
+        if (!sc->sample_sizes)
+            return AVERROR_INVALIDDATA;
+
         st->codecpar->width  = item->width;
         st->codecpar->height = item->height;
 
-- 
2.49.0



More information about the ffmpeg-devel mailing list