diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-01-17 22:57:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-17 21:34:53 +0200 |
commit | 9df52e5e46fd54a202b9c89d3cdf70920d8a326f (patch) | |
tree | ce3026cf50e6c2f40606d3b8dbac0ec2614e4a14 | |
parent | b5af4e23980d847fb5309168b4bf6e21e7a36b37 (diff) | |
download | ffmpeg-9df52e5e46fd54a202b9c89d3cdf70920d8a326f.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>
-rw-r--r-- | libavformat/tta.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/tta.c b/libavformat/tta.c index 7566939d48..1a53d7233f 100644 --- a/libavformat/tta.c +++ b/libavformat/tta.c @@ -124,7 +124,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; |