Check if requested data size doesn't overflow buffer.

This commit is contained in:
Bartosz Taudul 2019-10-24 21:22:22 +02:00
parent 01ceedb57a
commit 04b132b6e2

View File

@ -1965,6 +1965,7 @@ bool Profiler::CommitData()
bool Profiler::NeedDataSize( size_t len ) bool Profiler::NeedDataSize( size_t len )
{ {
assert( len <= TargetFrameSize );
bool ret = true; bool ret = true;
if( m_bufferOffset - m_bufferStart + len > TargetFrameSize ) if( m_bufferOffset - m_bufferStart + len > TargetFrameSize )
{ {