[FFmpeg-cvslog] avformat/mov: Check that sample_count is allocated in mov_parse_heif_items()
Michael Niedermayer
git at videolan.org
Thu Jun 26 02:34:38 EEST 2025
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Jun 21 23:15:17 2025 +0200| [0ffe97d9b9e10e88db29d8d910c24ec00ef24edc] | committer: Michael Niedermayer
avformat/mov: Check that sample_count is allocated in mov_parse_heif_items()
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
Reviewed-by: James Almer <jamrial at gmail.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ffe97d9b9e10e88db29d8d910c24ec00ef24edc
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 0f4a5cd9a3..bd6b23466b 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -10341,7 +10341,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;
More information about the ffmpeg-cvslog
mailing list