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:
serge_shubin 2026-03-23 05:06:27 +08:00
parent a1167ff398
commit 5987109014

View file

@ -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,9 +664,11 @@ static qboolean SVD_ReadFrame( fileHandle_t f ) {
if ( len > 0 && len < (short)sizeof(buf) ) {
FS_Read( buf, len, f );
buf[len - 1] = '\0';
if ( idx != CS_SERVERINFO && idx != CS_SYSTEMINFO ) {
SV_SetConfigstring( idx, buf );
}
}
}
return qtrue;
}