engine: client: fix buffer overflow in S_FindName
This commit is contained in:
parent
5d718aa0d6
commit
e754de46d1
1 changed files with 1 additions and 1 deletions
|
@ -221,7 +221,7 @@ sfx_t *S_FindName( const char *pname, int *pfInCache )
|
||||||
sfx = &s_knownSfx[i];
|
sfx = &s_knownSfx[i];
|
||||||
memset( sfx, 0, sizeof( *sfx ));
|
memset( sfx, 0, sizeof( *sfx ));
|
||||||
if( pfInCache ) *pfInCache = false;
|
if( pfInCache ) *pfInCache = false;
|
||||||
Q_strncpy( sfx->name, name, MAX_STRING );
|
Q_strncpy( sfx->name, name, sizeof( sfx->name ));
|
||||||
sfx->servercount = cl.servercount;
|
sfx->servercount = cl.servercount;
|
||||||
sfx->hashValue = COM_HashKey( sfx->name, MAX_SFX_HASH );
|
sfx->hashValue = COM_HashKey( sfx->name, MAX_SFX_HASH );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue