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

Michael Niedermayer git at videolan.org
Thu Apr 1 00:10:44 EEST 2021


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Mar 21 18:08:43 2021 +0100| [c1fe1114bc4c2f6da764f0eca792cf03c82c3422] | 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>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index f4c2215ba4..a1411264ec 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