1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-29 22:00:58 +02:00

avformat/ape: Use 64bit for final frame size

Fixes: CID1505963 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a2b8d03347930c051358fcbbdc557e57e157d9c9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-23 01:51:53 +02:00
parent 9c605c88a9
commit 2b79276114
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -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++) {