aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/tta.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-17 22:57:28 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-09 13:53:29 +0200
commit305ae7fc02b5331995a7694ceef2d818c96c7d37 (patch)
treeb5293c73b7dbe02339b9b0249ba9483a1c678193 /libavformat/tta.c
parent9bb8a4f773ca65fe924863ddc539cd2a1c1fcfb7 (diff)
downloadffmpeg-305ae7fc02b5331995a7694ceef2d818c96c7d37.tar.gz
avformat/tta: Use 64bit intermediate for index
Fixes: signed integer overflow: 42032 * 51092 cannot be represented in type 'int' Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_TTA_fuzzer-6679539648430080 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit fd61b42b4c8709a7888fa5c9cce0c19d754e39fc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/tta.c')
-rw-r--r--libavformat/tta.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c
index ae90a85544..c50f029d66 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -119,7 +119,7 @@ static int tta_read_header(AVFormatContext *s)
for (i = 0; i < c->totalframes; i++) {
uint32_t size = avio_rl32(s->pb);
int r;
- if ((r = av_add_index_entry(st, framepos, i * c->frame_size, size, 0,
+ if ((r = av_add_index_entry(st, framepos, i * (int64_t)c->frame_size, size, 0,
AVINDEX_KEYFRAME)) < 0)
return r;
framepos += size;