mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
game: fix string vulnerabilities
This commit is contained in:
@@ -987,7 +987,7 @@ void CHudMessage::AddChar( int r, int g, int b, int a, wchar_t ch )
|
||||
//-----------------------------------------------------------------------------
|
||||
void CHudMessage::GetTextExtents( int *wide, int *tall, const char *string )
|
||||
{
|
||||
*wide = g_pMatSystemSurface->DrawTextLen( m_hFont, (char *)string );
|
||||
*wide = g_pMatSystemSurface->DrawTextLen( m_hFont, "%s", (char *)string );
|
||||
*tall = vgui::surface()->GetFontTall( m_hFont );
|
||||
}
|
||||
|
||||
@@ -1067,4 +1067,4 @@ void CHudMessage::PaintCharacters()
|
||||
void CHudMessage::GetLength( int *wide, int *tall, const char *string )
|
||||
{
|
||||
GetTextExtents( wide, tall, string );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user