]> git.sesse.net Git - ffmpeg/commitdiff
libavformat/mov.c: Free aes_decrypt to avoid leaking memory
authorJohn Rummell <jrummell@chromium.org>
Mon, 30 Mar 2020 21:08:01 +0000 (14:08 -0700)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 1 Apr 2020 20:21:26 +0000 (22:21 +0200)
Found by Chromium fuzzers (crbug.com/1057205).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c

index f280f360b645c88d74140a8bda300f79dfb66dd9..f01502a5f88433cf6fdf5187e0c33a120e564725 100644 (file)
@@ -1005,6 +1005,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);