mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-09-03 09:42:20 +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 )
|
if( start )
|
||||||
{
|
{
|
||||||
Q_strncpy( _startspot, start, MAX_STRING );
|
Q_strncpy( _startspot, start, sizeof( _startspot ));
|
||||||
startspot = _startspot;
|
startspot = _startspot;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_strncpy( level, mapname, MAX_STRING );
|
Q_strncpy( level, mapname, sizeof( level ));
|
||||||
Q_strncpy( oldlevel, sv.name, MAX_STRING );
|
Q_strncpy( oldlevel, sv.name, sizeof( oldlevel ));
|
||||||
|
|
||||||
if( loadfromsavedgame )
|
if( loadfromsavedgame )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user