mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2024-12-26 23:05:30 +03:00
Fix format string vulnerabilities
This commit is contained in:
parent
5fa7648693
commit
b2c0ab41c0
@ -129,7 +129,7 @@ void CDebugOverlay::Paint()
|
|||||||
{
|
{
|
||||||
float xPos = screenPos[0];
|
float xPos = screenPos[0];
|
||||||
float yPos = screenPos[1]+ (pCurrText->lineOffset*13); // Line spacing;
|
float yPos = screenPos[1]+ (pCurrText->lineOffset*13); // Line spacing;
|
||||||
g_pMatSystemSurface->DrawColoredText( m_hFont, xPos, yPos, r, g, b, a, pCurrText->text );
|
g_pMatSystemSurface->DrawColoredText( m_hFont, xPos, yPos, r, g, b, a, "%s", pCurrText->text );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -138,7 +138,7 @@ void CDebugOverlay::Paint()
|
|||||||
{
|
{
|
||||||
float xPos = screenPos[0];
|
float xPos = screenPos[0];
|
||||||
float yPos = screenPos[1]+ (pCurrText->lineOffset*13); // Line spacing;
|
float yPos = screenPos[1]+ (pCurrText->lineOffset*13); // Line spacing;
|
||||||
g_pMatSystemSurface->DrawColoredText( m_hFont, xPos, yPos, r, g, b, a, pCurrText->text );
|
g_pMatSystemSurface->DrawColoredText( m_hFont, xPos, yPos, r, g, b, a, "%s", pCurrText->text );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -908,7 +908,7 @@ bool ScriptIsClient()
|
|||||||
// Notification printing on the right edge of the screen
|
// Notification printing on the right edge of the screen
|
||||||
void NPrint( int pos, const char* fmt )
|
void NPrint( int pos, const char* fmt )
|
||||||
{
|
{
|
||||||
engine->Con_NPrintf(pos, fmt);
|
engine->Con_NPrintf( pos, "%s", fmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
void NXPrint( int pos, int r, int g, int b, bool fixed, float ftime, const char* fmt )
|
void NXPrint( int pos, int r, int g, int b, bool fixed, float ftime, const char* fmt )
|
||||||
@ -922,7 +922,7 @@ void NXPrint( int pos, int r, int g, int b, bool fixed, float ftime, const char*
|
|||||||
info.color[2] = b / 255.f;
|
info.color[2] = b / 255.f;
|
||||||
info.fixed_width_font = fixed;
|
info.fixed_width_font = fixed;
|
||||||
|
|
||||||
engine->Con_NXPrintf( &info, fmt );
|
engine->Con_NXPrintf( &info, "%s", fmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
static float IntervalPerTick()
|
static float IntervalPerTick()
|
||||||
|
Loading…
Reference in New Issue
Block a user