mkvparser: Disallow durations in seconds greater than LONG_LONG_MAX.
libwebm cannot handle a duration in seconds greater than LONG_LONG_MAX because it stores the values in long long variables. BUG=23321923 Change-Id: Idb73f04a73e35829ae34386ea6c388fd355dd102
This commit is contained in:
@@ -3970,7 +3970,13 @@ long SegmentInfo::Parse() {
|
||||
assert(pos <= stop);
|
||||
}
|
||||
|
||||
const double rollover_check = m_duration * m_timecodeScale;
|
||||
if (rollover_check > LONG_LONG_MAX)
|
||||
return E_FILE_FORMAT_INVALID;
|
||||
|
||||
assert(pos == stop);
|
||||
if (pos != stop)
|
||||
return E_FILE_FORMAT_INVALID;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user