mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 09:02:38 +00:00
demux_mkv: reject 0 TimecodeScale
Also reject anything over INT_MAX; no particular reason for this upper bound. Fixes #1317.
This commit is contained in:
parent
73b7d4516b
commit
429fe85c48
@ -345,6 +345,10 @@ static int demux_mkv_read_info(demuxer_t *demuxer)
|
||||
if (info.n_timecode_scale) {
|
||||
mkv_d->tc_scale = info.timecode_scale;
|
||||
MP_VERBOSE(demuxer, "| + timecode scale: %" PRIu64 "\n", mkv_d->tc_scale);
|
||||
if (mkv_d->tc_scale < 1 || mkv_d->tc_scale > INT_MAX) {
|
||||
res = -1;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
if (info.n_duration) {
|
||||
mkv_d->duration = info.duration * mkv_d->tc_scale / 1e9;
|
||||
|
Loading…
Reference in New Issue
Block a user