[FFmpeg-cvslog] avformat/movenc: Fix segfault upon allocation error
Andreas Rheinhardt
git at videolan.org
Mon Sep 28 21:42:56 EEST 2020
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Mon Sep 28 16:00:56 2020 +0200| [4106013523f46824d32fd5b469ea264fbdfdb591] | committer: Andreas Rheinhardt
avformat/movenc: Fix segfault upon allocation error
Reviewed-by: Jan Ekström <jeebjp at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4106013523f46824d32fd5b469ea264fbdfdb591
---
libavformat/movenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 20768cd45f..2006fcee4b 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -6254,6 +6254,9 @@ static void mov_free(AVFormatContext *s)
MOVMuxContext *mov = s->priv_data;
int i;
+ if (!mov->tracks)
+ return;
+
if (mov->chapter_track) {
if (mov->tracks[mov->chapter_track].par)
av_freep(&mov->tracks[mov->chapter_track].par->extradata);
More information about the ffmpeg-cvslog
mailing list