aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-16 22:05:53 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-02 14:18:21 +0100
commit94a9ec633985039ce5f63c1dfdd847a392650a76 (patch)
tree1f67e8e740af3310ef09bf347f3c3876786c73ef
parent293222d8be9007957cc4b99e7466c673ec64b92a (diff)
downloadffmpeg-94a9ec633985039ce5f63c1dfdd847a392650a76.tar.gz
avformat/utils: Check dts in update_initial_timestamps() more
Fixes: signed integer overflow: -9223372036853488158 - 90000000 cannot be represented in type 'long long' Fixes: 26910/clusterfuzz-testcase-minimized-ffmpeg_dem_MPSUB_fuzzer-6696625298866176 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 29851cb840c176d514573914799ca6c95f3f4e8e) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/utils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 1b229095f2..7185fbfd71 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1137,6 +1137,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
dts == AV_NOPTS_VALUE ||
st->cur_dts == AV_NOPTS_VALUE ||
st->cur_dts < INT_MIN + RELATIVE_TS_BASE ||
+ dts < INT_MIN + (st->cur_dts - RELATIVE_TS_BASE) ||
is_relative(dts))
return;