[FFmpeg-cvslog] avformat/mov: Use 64bit for str_size

Michael Niedermayer git at videolan.org
Sun Jan 5 01:28:53 EET 2025


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Thu Jul 11 20:03:45 2024 +0200| [962bf1c1711c7fea26dceef1bd643e6c4e9740b5] | committer: Michael Niedermayer

avformat/mov: Use 64bit for str_size

We assign a 64bit variable to it before checking

Fixes: CID1604544 Overflowed integer argument

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 046d069552f5c2824f36fcf95d409670208dc94b)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 33e69d4533..006e58f3fc 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -262,7 +262,8 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom)
     char *str = NULL;
     const char *key = NULL;
     uint16_t langcode = 0;
-    uint32_t data_type = 0, str_size, str_size_alloc;
+    uint32_t data_type = 0, str_size_alloc;
+    uint64_t str_size;
     int (*parse)(MOVContext*, AVIOContext*, unsigned, const char*) = NULL;
     int raw = 0;
 



More information about the ffmpeg-cvslog mailing list