2
0
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:
Alibek Omarov 2024-05-06 06:42:47 +03:00
parent 5d718aa0d6
commit e754de46d1

View File

@ -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 );