Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-02-14 22:01:35 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-04-14 00:39:50 +0300
commit77f3f2aaf9bbd58aad74b373ce2ace57fd9c18a8 (patch)
treed67f5bc2c45e025063d470e8b4c5de280eb810f6
parent83d5b57074f55c838231d2f499042ddcb1423b30 (diff)
avformat/matroskadec: Check duration
Fixes: -nan is outside the range of representable values of type 'long' Fixes: 44614/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6216204841254912 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 36680078ca3302496d9b0b8a8d7168ce9eabb2bc) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/matroskadec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 36674195a1..8eb382744f 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -2628,6 +2628,8 @@ static int matroska_read_header(AVFormatContext *s)
if (!matroska->time_scale)
matroska->time_scale = 1000000;
+ if (isnan(matroska->duration))
+ matroska->duration = 0;
if (matroska->duration)
matroska->ctx->duration = matroska->duration * matroska->time_scale *
1000 / AV_TIME_BASE;