Sanitize the name with a maximum buffer size limit

This commit is contained in:
smallmodel 2024-12-08 12:51:14 +01:00 committed by GitHub
parent 5801af34bb
commit 333c452f44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 9 additions and 6 deletions

View file

@ -2580,7 +2580,7 @@ void CL_CheckUserinfo( void ) {
// send a reliable userinfo update if needed
if(cvar_modifiedFlags & CVAR_USERINFO)
{
if (Com_SanitizeName(name->string, szSanitizedName)) {
if (Com_SanitizeName(name->string, szSanitizedName, sizeof(szSanitizedName))) {
Cvar_Set("name", szSanitizedName);
}