mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-23 10:20:08 +01:00
engine: client: fix buffer overflow in S_FindName
This commit is contained in:
parent
5d718aa0d6
commit
e754de46d1
@ -221,7 +221,7 @@ sfx_t *S_FindName( const char *pname, int *pfInCache )
|
||||
sfx = &s_knownSfx[i];
|
||||
memset( sfx, 0, sizeof( *sfx ));
|
||||
if( pfInCache ) *pfInCache = false;
|
||||
Q_strncpy( sfx->name, name, MAX_STRING );
|
||||
Q_strncpy( sfx->name, name, sizeof( sfx->name ));
|
||||
sfx->servercount = cl.servercount;
|
||||
sfx->hashValue = COM_HashKey( sfx->name, MAX_SFX_HASH );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user