ioquake / ioq3

The ioquake3 community effort to continue supporting/developing id's Quake III Arena
https://ioquake3.org/
GNU General Public License v2.0
2.42k stars 529 forks source link

Prevent SV_DropClient() from being called recursively #693

Closed smallmodel closed 1 month ago

smallmodel commented 1 month ago

This fixes an issue where SV_DropClient() would get called twice on the same client if the later gets kicked and has too many reliable commands right while sending a server command in SV_DropClient(). For example when kicking a client, SV_DropClient() gets called and sends server commands (print + disconnect). If the kicked client has too many reliable commands, SV_AddServerCommand() would call SV_DropClient() again on the same client.

This bug can occur as follow:

timangus commented 1 month ago

Good catch.