[FFmpeg-cvslog] avformat/mov: make sure file_checksum is fully initialized

Michael Niedermayer git at videolan.org
Mon Aug 4 23:57:33 EEST 2025


ffmpeg | branch: release/7.0 | Michael Niedermayer <michael at niedermayer.cc> | Wed Jul 23 13:16:33 2025 +0200| [6fb79cf3ed13e5c383ec0a7b449ddc4c8a3d77f5] | committer: Michael Niedermayer

avformat/mov: make sure file_checksum is fully initialized

Fixes: use of uninitialized memory
Fixes: 394990189/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6431722199908352

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 8b16e1ddd9c0bc4ca90447d481186216cfdce0fe)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/mov.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index c37d67e563..68b46184e4 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1271,7 +1271,9 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     avio_read(pb, output, 8); // go to offset 8, absolute position 0x251
     avio_read(pb, input, DRM_BLOB_SIZE);
     avio_read(pb, output, 4); // go to offset 4, absolute position 0x28d
-    avio_read(pb, file_checksum, 20);
+    ret = ffio_read_size(pb, file_checksum, 20);
+    if (ret < 0)
+        goto fail;
 
     // required by external tools
     ff_data_to_hex(checksum_string, file_checksum, sizeof(file_checksum), 1);



More information about the ffmpeg-cvslog mailing list