[FFmpeg-cvslog] avformat/mov: take into account the first eight bytes in the keys atom

James Almer git at videolan.org
Mon Apr 29 15:46:29 EEST 2024


ffmpeg | branch: release/7.0 | James Almer <jamrial at gmail.com> | Mon Apr  1 23:52:53 2024 -0300| [0085da21b4ca67d9c1d4423d081f7139ba666dea] | committer: James Almer

avformat/mov: take into account the first eight bytes in the keys atom

Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 3d12ba77d9a4660b2e71889d1c2f99e8f3ade98b)

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9291195a8f..d551a0f8e0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5023,6 +5023,7 @@ static int mov_read_keys(MOVContext *c, AVIOContext *pb, MOVAtom atom)
 
     avio_skip(pb, 4);
     count = avio_rb32(pb);
+    atom.size -= 8;
     if (count > UINT_MAX / sizeof(*c->meta_keys) - 1) {
         av_log(c->fc, AV_LOG_ERROR,
                "The 'keys' atom with the invalid key count: %"PRIu32"\n", count);



More information about the ffmpeg-cvslog mailing list