mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Don't read beyond buffer end.
This commit is contained in:
parent
917da8cff3
commit
c52936855e
@ -475,12 +475,12 @@ void SourceView::ParseSource( const char* fileName, const Worker& worker, const
|
||||
if( *end == '\n' )
|
||||
{
|
||||
end++;
|
||||
if( *end == '\r' ) end++;
|
||||
if( end - m_data < sz && *end == '\r' ) end++;
|
||||
}
|
||||
else if( *end == '\r' )
|
||||
{
|
||||
end++;
|
||||
if( *end == '\n' ) end++;
|
||||
if( end - m_data < sz && *end == '\n' ) end++;
|
||||
}
|
||||
if( end - m_data == sz ) break;
|
||||
txt = end;
|
||||
|
Loading…
Reference in New Issue
Block a user