1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:57:34 +00:00

LibVideo/Matroska: Fix out-of-bounds access when seeking to cues

This commit is contained in:
Zaggy1024 2023-02-11 20:08:09 -06:00 committed by Andreas Kling
parent dadabb58eb
commit e813b8fd19

View file

@ -797,8 +797,8 @@ DecoderErrorOr<void> Reader::seek_to_cue_for_timestamp(SampleIterator& iterator,
return {}; return {};
} }
while (index < cue_points.size()) { while (++index < cue_points.size()) {
auto const& cue_point = cue_points[++index]; auto const& cue_point = cue_points[index];
dbgln_if(MATROSKA_DEBUG, "Checking future cue point {}ms", cue_point.timestamp().to_milliseconds()); dbgln_if(MATROSKA_DEBUG, "Checking future cue point {}ms", cue_point.timestamp().to_milliseconds());
if (cue_point.timestamp() > timestamp) if (cue_point.timestamp() > timestamp)
break; break;