engine: server: fix buffer overflow in invalid Q_strncpy call
This commit is contained in:
parent
79f2c69963
commit
9968b192c3
1 changed files with 3 additions and 3 deletions
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue