diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2022-02-09 22:01:03 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2022-04-06 20:27:35 +0200 |
commit | 166ee5fa684855ea0a44995c997cc09120c442a5 (patch) | |
tree | d9c7bdbc211c46c90efa6606099be34d31193605 /libavformat | |
parent | badf284b529520e51452f62cb16be7cb0c5582bf (diff) | |
download | ffmpeg-166ee5fa684855ea0a44995c997cc09120c442a5.tar.gz |
avformat/mov: Corner case encryption error cleanup in mov_read_senc()
Fixes: memleak
Fixes: 42341/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4566632823914496
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8ee0e4abcb8af36cae4eb24d4d6229461c1e3333)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 092c899fff..4bd4750a21 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6140,6 +6140,8 @@ static int mov_read_senc(MOVContext *c, AVIOContext *pb, MOVAtom atom) } if (pb->eof_reached) { av_log(c->fc, AV_LOG_ERROR, "Hit EOF while reading senc\n"); + if (ret >= 0) + av_encryption_info_free(encryption_index->encrypted_samples[i]); ret = AVERROR_INVALIDDATA; } |