aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-04-06 23:56:57 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-04-13 00:35:15 +0200
commit9b56e65e8c124cb2972295f8d80519c8409ab190 (patch)
tree055f7a1d86bc6c4ae57b04cdb49ff0f8be5674fc
parent9b1a4da668999c0bd4d78b370872b9448cf746c3 (diff)
downloadffmpeg-9b56e65e8c124cb2972295f8d80519c8409ab190.tar.gz
avformat/mov: Fix extradata memleak
Fixes: crbug 822705 Reported-by: Matt Wolenetz <wolenetz@google.com> Reviewed-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0a8133119ca5d087c7c7140d100406ff84c477ee) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mov.c6
1 files changed, 6 insertions, 0 deletions
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;