mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-22 23:33:07 +00:00
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>
This commit is contained in:
parent
c900f2e42c
commit
36680078ca
@ -3065,6 +3065,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;
|
||||
|
Loading…
Reference in New Issue
Block a user