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

avformat/flvdec: timestamps cannot use the full int64 range

We do not support this as we multiply by 1000
Fixes: signed integer overflow: -45318575073853696 * 1000 cannot be represented in type 'long'
Fixes: 42804/clusterfuzz-testcase-minimized-ffmpeg_dem_LIVE_FLV_fuzzer-4630325425209344

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg


Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c217ca77)
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 357c339a
No related branches found
No related tags found
No related merge requests found
......@@ -361,6 +361,8 @@ static int parse_keyframes_index(AVFormatContext *s, AVIOContext *ioc,
d = av_int2double(avio_rb64(ioc));
if (isnan(d) || d < INT64_MIN || d > INT64_MAX)
goto invalid;
if (current_array == &times && (d <= INT64_MIN / 1000 || d >= INT64_MAX / 1000))
goto invalid;
current_array[0][i] = d;
}
if (times && filepositions) {
......
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