Skip to content
Snippets Groups Projects
Commit 97a21e93 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarAndreas Rheinhardt <andreas.rheinhardt@outlook.com>
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 36680078)
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent a865deaa
No related branches found
No related tags found
No related merge requests found
......@@ -2186,6 +2186,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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment