[FFmpeg-cvslog] libavformat/mov.c: Free aes_decrypt to avoid leaking memory

John Rummell git at videolan.org
Fri Apr 24 02:14:20 EEST 2020


ffmpeg | branch: release/2.8 | John Rummell <jrummell at chromium.org> | Mon Mar 30 14:08:01 2020 -0700| [01e696609b62e29ea2a1276729ef6af3a011b4b1] | committer: Michael Niedermayer

libavformat/mov.c: Free aes_decrypt to avoid leaking memory

Found by Chromium fuzzers (crbug.com/1057205).

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit ad91cf1f2f5793db5c6dd7ab9947fcc6d7832607)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01e696609b62e29ea2a1276729ef6af3a011b4b1
---

 libavformat/mov.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1187851527..8b774ef53c 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -839,6 +839,7 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     sha = av_sha_alloc();
     if (!sha)
         return AVERROR(ENOMEM);
+    av_free(c->aes_decrypt);
     c->aes_decrypt = av_aes_alloc();
     if (!c->aes_decrypt) {
         ret = AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list