Filter CS_SERVERINFO/SYSTEMINFO in per-frame configstring changes
The per-frame configstring path in SVD_ReadFrame was not filtering dangerous configstrings like SVD_ApplyConfigstrings does. When a recorded map_restart changed CS_SERVERINFO (containing maxclients), applying it overwrote maxclients=64 with the recorded value, triggering a latched restart loop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a1167ff398
commit
5987109014
1 changed files with 4 additions and 2 deletions
|
|
@ -655,7 +655,7 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) {
|
|||
}
|
||||
}
|
||||
|
||||
// read configstring changes
|
||||
// read configstring changes (skip SERVERINFO/SYSTEMINFO to avoid latch restarts)
|
||||
numChanges = SVD_ReadShort( f );
|
||||
for ( i = 0; i < numChanges; i++ ) {
|
||||
short idx = SVD_ReadShort( f );
|
||||
|
|
@ -664,7 +664,9 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) {
|
|||
if ( len > 0 && len < (short)sizeof(buf) ) {
|
||||
FS_Read( buf, len, f );
|
||||
buf[len - 1] = '\0';
|
||||
SV_SetConfigstring( idx, buf );
|
||||
if ( idx != CS_SERVERINFO && idx != CS_SYSTEMINFO ) {
|
||||
SV_SetConfigstring( idx, buf );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue