diff mbox series

[FFmpeg-devel,4/7] avformat/argo_asf: Use 64bit in offset intermediate

Message ID 20240523011758.2434580-4-michael@niedermayer.cc
State Accepted
Commit d9d1f65308d40502015272a3d1cc9f805c77e075
Headers show
Series [FFmpeg-devel,1/7] avdevice/pulse_audio_enc: Use av_rescale() to avoid integer overflow | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Michael Niedermayer May 23, 2024, 1:17 a.m. UTC
Fixes: CID1467435 Unintentional integer overflow

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
---
 libavformat/argo_asf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavformat/argo_asf.c b/libavformat/argo_asf.c
index 61bfc6de1fc..e08f029f80c 100644
--- a/libavformat/argo_asf.c
+++ b/libavformat/argo_asf.c
@@ -259,7 +259,7 @@  static int argo_asf_seek(AVFormatContext *s, int stream_index,
         return -1;
 
     offset = asf->fhdr.chunk_offset + ASF_CHUNK_HEADER_SIZE +
-             (block * st->codecpar->block_align);
+             block * (int64_t)st->codecpar->block_align;
 
     if ((offset = avio_seek(s->pb, offset, SEEK_SET)) < 0)
         return offset;