mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
cd655e4c0d
commit
7f8e9d9b77
|
@ -1004,6 +1004,7 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||||
sha = av_sha_alloc();
|
sha = av_sha_alloc();
|
||||||
if (!sha)
|
if (!sha)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
av_free(c->aes_decrypt);
|
||||||
c->aes_decrypt = av_aes_alloc();
|
c->aes_decrypt = av_aes_alloc();
|
||||||
if (!c->aes_decrypt) {
|
if (!c->aes_decrypt) {
|
||||||
ret = AVERROR(ENOMEM);
|
ret = AVERROR(ENOMEM);
|
||||||
|
|
Loading…
Reference in New Issue