mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
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 fd61b42b4c
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b5af4e2398
commit
9df52e5e46
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user