[FFmpeg-cvslog] avformat/mov: zero initialize the index ranges buffer
James Almer
git at videolan.org
Tue Jan 23 23:39:51 EET 2024
ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Tue Jan 23 18:39:24 2024 -0300| [eee3b7e2fb0664b889e58c03f76e19ef23e4d1d8] | committer: James Almer
avformat/mov: zero initialize the index ranges buffer
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eee3b7e2fb0664b889e58c03f76e19ef23e4d1d8
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5cb907e120..4cffd6c7db 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3860,7 +3860,7 @@ static void mov_fix_index(MOVContext *mov, AVStream *st)
}
// allocate the index ranges array
- msc->index_ranges = av_malloc((msc->elst_count + 1) * sizeof(msc->index_ranges[0]));
+ msc->index_ranges = av_calloc((msc->elst_count + 1), sizeof(msc->index_ranges[0]));
if (!msc->index_ranges) {
av_log(mov->fc, AV_LOG_ERROR, "Cannot allocate index ranges buffer\n");
return;
More information about the ffmpeg-cvslog
mailing list