diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-11 18:55:57 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2018-04-13 21:46:16 +0200 |
commit | c48ceff786bdc96fdc64417118c457d03bd19871 (patch) | |
tree | 1e3e90eee6cf2c519549701bde0fa17aa52e2788 | |
parent | 5c62a3dbda151e5a184fc29b4c7079cf8415b7e8 (diff) | |
download | ffmpeg-c48ceff786bdc96fdc64417118c457d03bd19871.tar.gz |
avformat/utils: Fix integer overflow in end time calculation in update_stream_timings()
Fixes: crbug 829153
Reported-by: Matt Wolenetz <wolenetz@google.com>
Reviewed-by: Matt Wolenetz <wolenetz@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 84b926dc5a..69f9653190 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2648,7 +2648,7 @@ static void update_stream_timings(AVFormatContext *ic) else if (start_time > start_time_text) av_log(ic, AV_LOG_VERBOSE, "Ignoring outlier non primary stream starttime %f\n", start_time_text / (float)AV_TIME_BASE); - if (end_time == INT64_MIN || (end_time < end_time_text && end_time_text - end_time < AV_TIME_BASE)) { + if (end_time == INT64_MIN || (end_time < end_time_text && end_time_text - (uint64_t)end_time < AV_TIME_BASE)) { end_time = end_time_text; } else if (end_time < end_time_text) { av_log(ic, AV_LOG_VERBOSE, "Ignoring outlier non primary stream endtime %f\n", end_time_text / (float)AV_TIME_BASE); |