Fix out-of-bounds access on non-continuous frames.

This commit is contained in:
Bartosz Taudul 2024-05-24 22:52:46 +02:00
parent 005d092903
commit d3da7dcecd
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2121,7 +2121,7 @@ int64_t Worker::GetFrameEnd( const FrameData& fd, size_t idx ) const
} }
else else
{ {
if( fd.frames[idx].end >= 0 ) if( idx < fd.frames.size() && fd.frames[idx].end >= 0 )
{ {
return fd.frames[idx].end; return fd.frames[idx].end;
} }