mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/jacosubdec: Use 64bit intermediate for start/end timestamp shift
Fixes: signed integer overflow: -1957694447 + -1620425806 cannot be represented in type 'int'
Fixes: 30207/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5050791771635712
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 2c477be08a
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c6f7b44202
commit
3d959551ea
@ -125,8 +125,8 @@ static const char *read_ts(JACOsubContext *jacosub, const char *buf,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
shift_and_ret:
|
shift_and_ret:
|
||||||
ts_start64 = (ts_start + jacosub->shift) * 100LL / jacosub->timeres;
|
ts_start64 = (ts_start + (int64_t)jacosub->shift) * 100LL / jacosub->timeres;
|
||||||
ts_end64 = (ts_end + jacosub->shift) * 100LL / jacosub->timeres;
|
ts_end64 = (ts_end + (int64_t)jacosub->shift) * 100LL / jacosub->timeres;
|
||||||
*start = ts_start64;
|
*start = ts_start64;
|
||||||
*duration = ts_end64 - ts_start64;
|
*duration = ts_end64 - ts_start64;
|
||||||
return buf + len;
|
return buf + len;
|
||||||
|
Loading…
Reference in New Issue
Block a user