diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-03-26 00:57:33 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-03-26 23:25:42 +0100 |
commit | e849eb23432e45d0a1fda3901bb84eff0ce91282 (patch) | |
tree | 49f779129f1ab0a380f4de85f5025e22d43b5168 | |
parent | 61dca9e150b723a160d4a570885f3e5326c3d276 (diff) | |
download | ffmpeg-e849eb23432e45d0a1fda3901bb84eff0ce91282.tar.gz |
avformat/matroskadec: Check timescale
Fixes: 3.82046e+18 is outside the range of representable values of type 'unsigned int'
Fixes: 62276/clusterfuzz-testcase-minimized-ffmpeg_dem_WEBM_DASH_MANIFEST_fuzzer-6381436594421760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index e724e50a8e..e37fcfa018 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3195,6 +3195,10 @@ static int matroska_parse_tracks(AVFormatContext *s) track->time_scale); track->time_scale = 1.0; } + + if (matroska->time_scale * track->time_scale > UINT_MAX) + return AVERROR_INVALIDDATA; + avpriv_set_pts_info(st, 64, matroska->time_scale * track->time_scale, 1000 * 1000 * 1000); /* 64 bit pts in ns */ |