[FFmpeg-cvslog] avformat/mov: Fix extradata memleak
Michael Niedermayer
git at videolan.org
Fri Apr 13 02:58:41 EEST 2018
ffmpeg | branch: release/3.3 | Michael Niedermayer <michael at niedermayer.cc> | Fri Apr 6 23:56:57 2018 +0200| [9b56e65e8c124cb2972295f8d80519c8409ab190] | committer: Michael Niedermayer
avformat/mov: Fix extradata memleak
Fixes: crbug 822705
Reported-by: Matt Wolenetz <wolenetz at google.com>
Reviewed-by: Matt Wolenetz <wolenetz at google.com>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 0a8133119ca5d087c7c7140d100406ff84c477ee)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> 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;
More information about the ffmpeg-cvslog
mailing list