Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-10 00:01:03 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-02-15 23:25:43 +0300
commit8ee0e4abcb8af36cae4eb24d4d6229461c1e3333 (patch)
tree2230a6d76c0c57c99b6eb6b92342c5618b378c9e /libavformat/mov.c
parent30c7f37d807d5bed9aaf9f7bed23b6299c75a5c3 (diff)
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>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index a80fcc1606..5e26267810 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6105,6 +6105,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;
}