mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
engine: server: fix buffer overflow in invalid Q_strncpy call
This commit is contained in:
@@ -2043,12 +2043,12 @@ void SV_ChangeLevel( qboolean loadfromsavedgame, const char *mapname, const char
|
||||
|
||||
if( start )
|
||||
{
|
||||
Q_strncpy( _startspot, start, MAX_STRING );
|
||||
Q_strncpy( _startspot, start, sizeof( _startspot ));
|
||||
startspot = _startspot;
|
||||
}
|
||||
|
||||
Q_strncpy( level, mapname, MAX_STRING );
|
||||
Q_strncpy( oldlevel, sv.name, MAX_STRING );
|
||||
Q_strncpy( level, mapname, sizeof( level ));
|
||||
Q_strncpy( oldlevel, sv.name, sizeof( oldlevel ));
|
||||
|
||||
if( loadfromsavedgame )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user