[FFmpeg-cvslog] avformat/ape: Use 64bit for final frame size

Michael Niedermayer git at videolan.org
Fri Jun 14 22:20:34 EEST 2024


ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Thu May 23 01:51:53 2024 +0200| [2b79276114c035ddd4d98df1061ca7e3d326e10d] | committer: Michael Niedermayer

avformat/ape: Use 64bit for final frame size

Fixes: CID1505963 Unintentional integer overflow

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

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

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

diff --git a/libavformat/ape.c b/libavformat/ape.c
index 58d4f7cfa8..d89d654b8c 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -324,7 +324,7 @@ static int ape_read_header(AVFormatContext * s)
         final_size -= final_size & 3;
     }
     if (file_size <= 0 || final_size <= 0)
-        final_size = ape->finalframeblocks * 8;
+        final_size = ape->finalframeblocks * 8LL;
     ape->frames[ape->totalframes - 1].size = final_size;
 
     for (i = 0; i < ape->totalframes; i++) {



More information about the ffmpeg-cvslog mailing list