ffmpeg | branch: release/3.3 | Michael Niedermayer |
Fri Apr 6 23:56:57 2018 +0200| [9b56e65e8c124cb2972295f8d80519c8409ab190] |
committer: Michael Niedermayer
avformat/mov: Fix extradata memleak
Fixes: crbug 822705
Reported-by: Matt Wolenetz
Reviewed-by: Matt Wolenetz
Signed-off-by: Michael Niedermayer
(cherry picked from commit 0a8133119ca5d087c7c7140d100406ff84c477ee)
Signed-off-by: Michael Niedermayer
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9b56e65e8c124cb2972295f8d80519c8409ab190
---
libavformat/mov.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index b60f8f0eac..921db588ef 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2391,6 +2391,12 @@ static int mov_read_stsd(MOVContext *c, AVIOContext *pb,
MOVAtom atom)
return mov_finalize_stsd_codec(c, pb, st, sc);
fail:
+if (sc->extradata) {
+int j;
+for (j = 0; j < sc->stsd_count; j++)
+av_freep(&sc->extradata[j]);
+}
+
av_freep(&sc->extradata);
av_freep(&sc->extradata_size);
return ret;
___
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog