mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +02:00
avformat/microdvddec: use 64bit for durations
Fixes: signed integer overflow: 7 - -2147483647 cannot be represented in type 'int'
Fixes: 28036/clusterfuzz-testcase-minimized-ffmpeg_dem_MICRODVD_fuzzer-5171698751766528
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 f569ac4ce0
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
59652534dd
commit
897c1c990a
@ -65,12 +65,12 @@ static int64_t get_pts(const char *buf)
|
||||
return AV_NOPTS_VALUE;
|
||||
}
|
||||
|
||||
static int get_duration(const char *buf)
|
||||
static int64_t get_duration(const char *buf)
|
||||
{
|
||||
int frame_start, frame_end;
|
||||
|
||||
if (sscanf(buf, "{%d}{%d}", &frame_start, &frame_end) == 2)
|
||||
return frame_end - frame_start;
|
||||
return frame_end - (int64_t)frame_start;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user