[FFmpeg-devel] [PATCH 4/6] avformat/mov: Do not zero memory that is written too or unused

Michael Niedermayer michael at niedermayer.cc
Mon Mar 22 22:58:31 EET 2021


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>
---
 libavformat/mov.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index b90cec7173..5f8bcfbf22 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3018,7 +3018,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);
 
-- 
2.17.1



More information about the ffmpeg-devel mailing list