aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-04-13 11:38:48 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2018-07-08 19:45:46 +0200
commitbb6146ca6d66459254b5e332f258d3e9a72a20ea (patch)
tree94b49d554591697b07ca1ffc27713ef168a4f5df /libavformat/utils.c
parent1fbd13ebe529ef6e17bb66f2216271d933c70c39 (diff)
downloadffmpeg-bb6146ca6d66459254b5e332f258d3e9a72a20ea.tar.gz
avformat/utils: Check cur_dts in update_initial_timestamps() more
Fixes: runtime error: signed integer overflow: 18133149658382192 - -9223090561878065151 cannot be represented in type 'long long' Fixes: crbug 831552 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 37d46dc21d708192b12aa13617ebe6a117b07363) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index f204bcd3a5..8129528a85 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1075,6 +1075,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
if (st->first_dts != AV_NOPTS_VALUE ||
dts == AV_NOPTS_VALUE ||
st->cur_dts == AV_NOPTS_VALUE ||
+ st->cur_dts < INT_MIN + RELATIVE_TS_BASE ||
is_relative(dts))
return;