mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-03-10 12:41:39 +00:00
engine: server: fix buffer overflow in invalid Q_strncpy call
This commit is contained in:
parent
79f2c69963
commit
9968b192c3
@ -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…
x
Reference in New Issue
Block a user