aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-04-11 18:55:57 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-06-18 01:16:03 +0200
commitca119e9456a22c3205794beb425bdc6ac24d97e8 (patch)
tree9c17a24f0e1662fc90c908a65a391c96a3bd006f /libavformat/utils.c
parent78c8e77c8635d02b63cbd858a975823ace310a32 (diff)
downloadffmpeg-ca119e9456a22c3205794beb425bdc6ac24d97e8.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> (cherry picked from commit c48ceff786bdc96fdc64417118c457d03bd19871) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2ca80e0925..afafb59bfe 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2611,7 +2611,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);