ffmpeg | branch: release/3.3 | Michael Niedermayer <mich...@niedermayer.cc> | 
Wed Apr 11 18:55:57 2018 +0200| [01645d59156733d80f6fe777814fbe665c6164ed] | 
committer: Michael Niedermayer

avformat/utils: Fix integer overflow in end time calculation in 
update_stream_timings()

Fixes: crbug 829153

Reported-by: Matt Wolenetz <wolen...@google.com>
Reviewed-by: Matt Wolenetz <wolen...@google.com>
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit c48ceff786bdc96fdc64417118c457d03bd19871)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=01645d59156733d80f6fe777814fbe665c6164ed
---

 libavformat/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 0749151ee3..6da5838dbc 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2608,7 +2608,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);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to