ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Fri Jun 28 21:06:53 2024 -0300| [2aa63784b533f461785c3e767e354e84c7e2c8c2] | committer: James Almer
avformat/mov: check that sample and chunk count is 1 for HEIF Fixes NULL pointer dereference in broken/fuzzed streams. Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2aa63784b533f461785c3e767e354e84c7e2c8c2 --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index b74e43e214..dc77599faa 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -10063,6 +10063,9 @@ static int mov_read_header(AVFormatContext *s) st->codecpar->width = item->width; st->codecpar->height = item->height; + if (sc->sample_count != 1 || sc->chunk_count != 1) + return AVERROR_INVALIDDATA; + sc->sample_sizes[0] = item->extent_length; sc->chunk_offsets[0] = item->extent_offset + offset; _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".