1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

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

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ad91cf1f2f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
John Rummell 2020-03-30 14:08:01 -07:00 committed by Michael Niedermayer
parent e9b952d283
commit c703bdf3c8

View File

@ -1019,6 +1019,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);