aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-03-21 18:08:43 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 14:41:41 +0200
commitc44458dcfaf97b3cf813cf9e97e4208d2751769c (patch)
treeb635a9647338eb1c5f168097ff1aa4ec5ef0ecea
parent60d304ca9297f794aa794b525d92ab11bd13eacd (diff)
downloadffmpeg-c44458dcfaf97b3cf813cf9e97e4208d2751769c.tar.gz
avformat/mov: Do not zero memory that is written too or unused
Fixes: OOM Fixes: 31220/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6033383962574848 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 c1fe1114bc4c2f6da764f0eca792cf03c82c3422) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 1559c3e7fd..4dc08af7b0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3008,7 +3008,7 @@ static int mov_read_sdtp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_freep(&sc->sdtp_data);
sc->sdtp_count = 0;
- sc->sdtp_data = av_mallocz(entries);
+ sc->sdtp_data = av_malloc(entries);
if (!sc->sdtp_data)
return AVERROR(ENOMEM);