[FFmpeg-cvslog] avformat/mov: Do not zero memory that is written too or unused

Michael Niedermayer git at videolan.org
Thu Apr 1 12:50:01 EEST 2021


ffmpeg | branch: release/4.4 | Michael Niedermayer <michael at niedermayer.cc> | Sun Mar 21 18:08:43 2021 +0100| [5978b8bd9ce1680bbe412815d8a40ca2089177ab] | committer: Michael Niedermayer

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 at niedermayer.cc>
(cherry picked from commit c1fe1114bc4c2f6da764f0eca792cf03c82c3422)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5978b8bd9ce1680bbe412815d8a40ca2089177ab
---

 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 73b9ad814e..50234f3b5f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3022,7 +3022,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);
 



More information about the ffmpeg-cvslog mailing list