Be careful about buffer overflow.
This commit is contained in:
@@ -102,7 +102,7 @@ void ThreadSlot::ThreadCheckpoint::Set( const char *szFile, int iLine, const cha
|
||||
m_szFile = p+1;
|
||||
}
|
||||
|
||||
sprintf( m_szFormattedBuf, " %s:%i %s", m_szFile, m_iLine, m_szMessage? m_szMessage:"" );
|
||||
snprintf( m_szFormattedBuf, sizeof(m_szFormattedBuf), " %s:%i %s", m_szFile, m_iLine, m_szMessage? m_szMessage:"" );
|
||||
}
|
||||
|
||||
const char *ThreadSlot::ThreadCheckpoint::GetFormattedCheckpoint()
|
||||
|
||||
Reference in New Issue
Block a user